Skip to content

fix(session): remove orchestrator kickoff auto-prompt on spawn#227

Merged
harshitsinghbhandari merged 2 commits into
mainfrom
fix/aa-100-remove-orchestrator-kickoff
Jun 13, 2026
Merged

fix(session): remove orchestrator kickoff auto-prompt on spawn#227
harshitsinghbhandari merged 2 commits into
mainfrom
fix/aa-100-remove-orchestrator-kickoff

Conversation

@harshitsinghbhandari

@harshitsinghbhandari harshitsinghbhandari commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

What

Two fixes:

1. Remove orchestrator kickoff auto-prompt on spawn (issue #226)

Spawning a session without an explicit prompt injected a "Get oriented: review the current repo state..." kickoff turn for orchestrators, surfacing as an unsolicited message delivered on spawn. Removed the orchestratorKickoffPrompt auto-injection in buildSpawnTexts, so a promptless spawn now delivers nothing to the agent (it lands at an empty input box). The coordinator role still rides the system prompt, unchanged.

2. Re-apply derived system prompt on agent resume (pre-existing main breakage)

While running the gate, the three TestRestore_* cases in session_manager were red — and they were already red on main (the Go CI job on the latest main push is failing). Root cause: restoreArgv re-derives the standing system prompt but only handed it to the fresh-launch fallback, not the native GetRestoreCommand path, so a resumed orchestrator/worker lost its role instructions. Now SystemPrompt is passed through to the restore command too, matching adapters that re-append it on resume (cf. TestGetRestoreCommandReappendsSystemPrompt in claudecode).

The recordingAgent test double also returned ok=true unconditionally, so the fallback-launch path was never exercised; it now returns ok=false without an agent-session id, mirroring every real adapter.

Changes

  • backend/internal/session_manager/manager.go: drop orchestratorKickoffPrompt + its injection; pass SystemPrompt into the GetRestoreCommand RestoreConfig.
  • backend/internal/session_manager/manager_test.go: TestSpawnOrchestrator_UsesCoordinatorPrompt asserts an empty launch prompt; recordingAgent.GetRestoreCommand returns ok=false without an agent-session id.

Testing

cd backend && go build ./... && go test -race ./...1294 passed, 0 failed (63 packages).

Closes #226

Spawning a session without an explicit prompt injected a "Get oriented..."
kickoff turn for orchestrators, which surfaced as an unsolicited message to
the orchestrator. Drop the auto-prompt so a promptless spawn delivers nothing
to the agent, leaving it idle at an empty input box.

Closes #226

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

harshitsinghbhandari has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

Restore re-derives the standing system prompt but only handed it to the
fresh-launch fallback, not the native GetRestoreCommand path, so a resumed
orchestrator/worker lost its role instructions. Pass SystemPrompt through to
the restore command too, matching adapters that re-append it on resume.

Also fix the recordingAgent test double to return ok=false when there is no
agent-session id, mirroring every real adapter, so the fallback-launch path is
actually exercised. These three TestRestore_* cases were red on main since #222.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

harshitsinghbhandari has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@harshitsinghbhandari harshitsinghbhandari merged commit c496101 into main Jun 13, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Worker spawn auto-sends a 'get oriented' message to the orchestrator

1 participant