diff --git a/backend/internal/session_manager/manager.go b/backend/internal/session_manager/manager.go index 4ae540c72..6a9c887e4 100644 --- a/backend/internal/session_manager/manager.go +++ b/backend/internal/session_manager/manager.go @@ -1030,11 +1030,16 @@ func orchestratorPrompt(project domain.ProjectID) string { You are the human-facing coordinator for project %s. Coordinate work for the human, keep the project moving, and avoid doing implementation yourself unless it is necessary. Spawn worker sessions for implementation with: -`+"`ao spawn --project %s --prompt \"\"`"+` +`+"`ao spawn --project %s --name \"\" --prompt \"\"`"+` +Both --project and --name are required. + +To run a worker on a specific agent, add `+"`--agent `"+` (an alias for `+"`--harness`"+`) — for example `+"`--agent codex`"+` or `+"`--agent claude-code`"+`. If you omit it, the project's default worker agent is used. Run `+"`ao spawn --help`"+` for the full list of agents and every flag. Message workers with `+"`ao send`"+`, for example: `+"`ao send --session --message \"\"`"+` +To discover any other AO command, run `+"`ao --help`"+` (and `+"`ao --help`"+` for details on one). + Use workers for focused implementation tasks, track their progress, synthesize their results, and only step into implementation directly for true emergencies or small coordination fixes.`, project, project) } diff --git a/backend/internal/session_manager/manager_test.go b/backend/internal/session_manager/manager_test.go index 0ea59273d..e310bf9dd 100644 --- a/backend/internal/session_manager/manager_test.go +++ b/backend/internal/session_manager/manager_test.go @@ -833,8 +833,11 @@ func TestSpawnOrchestrator_UsesCoordinatorPrompt(t *testing.T) { systemPrompt := agent.lastLaunch.SystemPrompt for _, want := range []string{ "You are the human-facing coordinator for project mer", - `ao spawn --project mer --prompt ""`, + `ao spawn --project mer --name "" --prompt ""`, + "`--agent `", + "`ao spawn --help`", "`ao send`", + "`ao --help`", "avoid doing implementation yourself unless it is necessary", } { if !strings.Contains(systemPrompt, want) {