Skip to content

fix(session-manager): deliver orchestrator instructions via system prompt#189

Merged
harshitsinghbhandari merged 1 commit into
mainfrom
fix/issue-182-system-prompt
Jun 11, 2026
Merged

fix(session-manager): deliver orchestrator instructions via system prompt#189
harshitsinghbhandari merged 1 commit into
mainfrom
fix/issue-182-system-prompt

Conversation

@harshitsinghbhandari

Copy link
Copy Markdown
Collaborator

Summary

  • Orchestrator role definitions and worker coordination hints were being appended to the user-facing Prompt string, conflating standing instructions with the human's task request.
  • Both are now placed in LaunchConfig.SystemPrompt so agents receive them as persistent behavioral context via --append-system-prompt, not as part of the conversational turn.
  • Metadata.Prompt now stores only the user's actual task prompt, which is correct for session restore.
  • The unused appendPromptSection helper is removed.

Closes #182

Test plan

  • TestSpawnOrchestrator_UsesCoordinatorPrompt — verifies coordinator instructions appear in SystemPrompt, not Prompt
  • TestSpawnWorker_AppendsActiveOrchestratorContact — verifies coordination hint is in SystemPrompt; user prompt stored as-is in metadata
  • TestSpawnWorker_SkipsTerminatedOrchestratorContact — verifies no coordination hint for terminated orchestrators
  • go test -race ./... — 1264 tests pass

🤖 Generated with Claude Code

…ompt

Orchestrator role definitions and worker coordination hints were being
prepended/appended to the user-facing prompt string. They now go into
SystemPrompt in LaunchConfig so agents receive them as standing instructions
rather than part of the human's task request.

Closes #182

Co-Authored-By: Claude Sonnet 4.6 <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 9b4651c into main Jun 11, 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.

Orchestrator instructions should be delivered via system prompt, not user message

1 participant