Activation
src/coordinator/coordinatorMode.ts enables coordinator mode only when both conditions are true:
- the build includes
COORDINATOR_MODE CLAUDE_CODE_COORDINATOR_MODEis truthy
What changes in this mode
Coordinator mode changes both:- the system prompt
- the tool context communicated to the model
getCoordinatorSystemPrompt() tells the assistant to act as an orchestrator that delegates research, implementation, and verification to workers.
Worker tool context
getCoordinatorUserContext() computes a worker capability summary and injects it into context.
In simple mode, workers are described as having a minimal set such as Bash, Read, and Edit. Outside simple mode, the function uses ASYNC_AGENT_ALLOWED_TOOLS, removes internal worker-only tools, and can also mention MCP servers.
Session resumption
matchSessionMode() ensures that resumed sessions re-enter or exit coordinator mode to match the stored session state. It does this by mutating CLAUDE_CODE_COORDINATOR_MODE at resume time when necessary.
That is a concrete implementation detail, not just UI state.