- a normal team handles work through shared files and ticket lanes
- a swarm orchestrator is for parallel coding work using git worktrees + tmux sessions
- it is best when one lead wants to fan work out to multiple coding agents at once
What it is
The Swarm Orchestrator is a recipe/scaffold that creates an orchestration workspace for parallel coding work. Its job is to:- split work into focused tasks
- spin up multiple coding agents in parallel
- give each one its own branch/worktree/session
- track what is active
- help monitor and clean up those parallel tasks
When to use it
Use Swarm Orchestrator when:- one ticket can be split into several parallel coding tasks
- you want separate branches/worktrees for isolation
- you want to monitor several coding sessions at once
- you want a lead/orchestrator role to coordinate multiple implementation attempts
- the work is simple enough for one normal ticket/one agent
- you do not want git worktrees
- you do not want tmux sessions
- the extra orchestration overhead is not worth it
What it creates
The bundledswarm-orchestrator recipe creates an orchestrator workspace with files like:
CONVENTIONS.md— naming rules and defaultsPROMPT_TEMPLATE.md— the required base prompt for spawned coding agentsTEMPLATE.md— starter task/spec shapeenv.sh— local environment valuesspawn.sh/task.sh— start workcheck-agents.sh— inspect current swarm sessionscleanup.sh— safe cleanup helpersactive-tasks.json— lightweight task registry
Core concepts
Worktree
Each coding task gets its own git worktree. That means one repo can support multiple isolated task directories at the same time.Branch
Each task gets its own branch. That keeps parallel agent work separated and easier to review.tmux session
Each coding agent runs in its own tmux session. That means you can:- attach to it
- watch it live
- steer it
- recover it if needed
Registry
The orchestrator keeps a lightweight registry of active tasks in:- what is running?
- on what branch?
- in which worktree?
- in which tmux session?
Team editor angle
From the team editor point of view, the Swarm Orchestrator is useful when you want a visible place to manage parallel implementation work. The team editor should help you:- see whether an orchestrator exists for the team
- see the orchestrator workspace path
- inspect active tasks / sessions / branches
- know where env/config values live
- know which files to edit for conventions and prompts
- the team editor is the dashboard
- the orchestrator workspace is the operating surface
- worktree root
- base ref
- active tasks
- task ids
- tmux session names
- registry status
- links to
.clawdbot/CONVENTIONS.mdand.clawdbot/PROMPT_TEMPLATE.md
How to inspect the recipe
Typical setup flow
1) Scaffold the orchestrator
The exact scaffold command depends on how you want to install it, but the first thing is to inspect the recipe and then scaffold it into a workspace.2) Configure environment values
The orchestrator relies on values in.clawdbot/env.sh.
Common ones include:
SWARM_REPO_DIRSWARM_WORKTREE_ROOTSWARM_BASE_REF- optional agent-runner command settings
- keep worktrees in a dedicated folder
- keep that folder outside the repo
- keep it outside the OpenClaw workspace if possible
3) Check prerequisites
Common prerequisites include:gittmuxjq
Starting work
The orchestrator’s job is to start focused tasks. Typical pattern:- create a task spec
- choose branch/worktree/session names
- spawn the task
- record/update the registry
Monitoring work
To inspect current orchestrated work:- active tasks
- branch names
- worktree paths
- tmux sessions
- rough task status
Cleanup
There is also a cleanup script in the scaffold. Typical use:- do not delete worktrees/branches casually
- cleanup should stay conservative unless explicitly enabled
Suggested workflow
A practical orchestrator loop looks like this:- identify a ticket worth parallelizing
- break it into 2–N focused tasks
- create one branch/worktree/session per task
- monitor progress via tmux + registry
- review outputs / PRs
- merge or discard branches intentionally
- clean up finished worktrees
Common mistakes
1) Using swarm for tiny work
If one agent can do it cleanly, swarm is probably overkill.2) Not setting a dedicated worktree root
That turns cleanup and inspection into a mess.3) Letting naming drift
Use the conventions file. Otherwise you end up with branch/session chaos.4) Treating tmux as optional when debugging
If agents are launched into tmux, tmux is the source of truth for what is actually happening live.5) Deleting worktrees too early
Only clean up once branches/PRs/status are clearly done.How this should relate to the team editor
The team editor should make orchestrator use easier by exposing:- whether the team has an orchestrator
- the orchestrator workspace location
- key env/config values
- active tasks summary
- links to conventions/prompt files
- where to monitor/clean up
- editor for visibility and navigation
- orchestrator workspace/scripts for execution
