Orchestrator
The Intelligent Manager is the heart of every Agenties project. It is a persistent Claude process that never writes code itself — its only job is to read the current state of the project, decide what needs to happen, and delegate to the right specialist via spawn_agent. Understanding the orchestrator is key to getting the most out of Agenties.
Session lifecycle
The orchestrator does not run as a daemon. It is a turn-based process — it wakes up, does its thinking, spawns agents, then exits. The next time it needs to run, it resumes using the same Claude session ID, which gives it access to its conversation history.
What triggers a turn
User messageYou type a message in the Chat tab. The orchestrator starts immediately.task-done mailbox eventA sub-agent posts a task-done message. The orchestrator auto-wakes to process the result and decide what to do next.HeartbeatA scheduled cron heartbeat fires. The orchestrator starts a proactive turn without any user prompt.Routine triggerAn API call, GitHub webhook, or schedule fires a routine. The orchestrator receives the issue context.What happens at turn start
At the beginning of every turn, before doing anything else, the orchestrator reads:
This context loading is automatic — the orchestrator's system prompt instructs it to always start turns this way. You don't need to remind it of the project state.
Delegation via spawn_agent
The orchestrator's primary action is calling spawn_agent. This creates a new Claude Code process with a specific role, task, and context. The orchestrator itself never edits files, runs tests, or executes commands.
spawn_agent multiple times before any of them complete. The agents run concurrently and report back via the mailbox.Agent roles the orchestrator delegates to
| Role | Purpose | Typical tasks |
|---|---|---|
| builder | Implements features and fixes bugs | Write code, run tests, create PRs, fix lint errors |
| reviewer | Reviews code and provides feedback | Read diffs, check against requirements, post review-result |
| scout | Researches codebase and external sources | grep for patterns, read docs, summarise findings to vault |
| coordinator | Manages multi-step sub-tasks (up to 10 turns) | Break down complex tasks, delegate to builders, aggregate results |
Autonomous hiring
If you enable Autonomous hiring in Settings → Team, the orchestrator can call hire_team_member to create new team members on the fly when no suitable existing member is found for a task. It picks the model, effort level, and writes role-appropriate base instructions.
Hired members persist in team.json and are available for future tasks. They accumulate XP just like manually created members.
Stopping agents
Clicking Stop in the UI triggers a cancel cascade:
Session resumption
The orchestrator's session ID is stored in .agenties/shared/state.json under the keyorchestratorSessionId. When the orchestrator starts a new turn, it passes this ID to Claude Code via the --resume flag, restoring the full conversation history.
You can start a fresh orchestrator session at any time with /clear in the chat. This discards the old session ID and starts from scratch, but the vault memory and shared state are preserved.
Session compaction
Long-running orchestrator sessions are automatically compacted by Claude Code when the context window approaches its limit. The compacted summary is seamlessly injected at the start of the next turn. The orchestrator also supports manual compaction via /wrapup, which saves a structured summary to the vault before starting a new session.