Agent Teams
For parallel full Claude instances, enable Claude Code’s experimental Agent Teams. lucid keeps the teammates in sync the same way it keeps subagents in sync.
Enable Agent Teams#
Agent Teams is a Claude Code feature behind an environment variable. Set it when you start Claude Code:
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 claudelucid doesn’t spawn agents itself. It keeps the ones Claude Code spawns in sync. With Agent Teams enabled, /lucid:swarm spawns teammates; without it, it uses background subagents.
What teammates get#
- The full dream when they start, instead of a one-paragraph brief.
- Only what changed, before each of their tool calls, including plan diffs.
- Claims: their writes to files another active agent claimed are blocked, and their own claims protect their files.
- The stop gate when their task completes, and automatic release of their claims.
- Their own id on every entry they write.
If a change of plan makes a teammate’s task obsolete or conflicting, /lucid:replan has the lead message that teammate directly (SendMessage) instead of waiting for it to finish.
Verified live: in-process and split-pane#
In a live run in tmux with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1, the lead picked /lucid:swarm on its own and spawned @pricing-worker and @cart-worker as in-process teammates. lucid’s hooks fired inside both teammates: start, every tool call, plan edits and stop, each under the teammate’s own id. Both claimed, worked, logged and were auto-released.
In split-pane mode (teammateMode: "tmux"), each teammate is a separate claude process in its own tmux pane. lucid loads there too: in a live run both teammates claimed their files and logged notes, the cart teammate applied a mid-task plan change itself, and the hidden acceptance test passed 4/4. Two differences: a split-pane teammate shows up under its session id (for example main-5d04) rather than its name, and the once-only stop gate, which works on subagents, doesn’t apply to it. Its claims are released when its turn ends.
The in-process run also uncovered a gap that is now fixed: a teammate edited through a Python heredoc in Bash, which skipped claims and the stop gate. File writes made through Bash are now checked too. See Bash write detection.