Skip to content

Summary: Multi-agent integration patterns

Shared origin (default): all agents push to one remote, lead pulls and integrates. Standard team workflow, agent branches visible to all.

Per-agent fork (isolation): each agent has its own remote, lead pulls from each separately. For untrusted agents, external contributors, hard isolation.

Shared worktrees (fast iteration): all worktrees on lead’s machine, nothing pushed until integration final. For solo leads in focused sprints.

  • Default? Use shared origin
  • Other-human review of in-flight agent branches needed? Use shared origin
  • Untrusted or external agents? Use per-agent fork
  • Fast solo iteration, lead controls everything? Use shared worktrees
  1. Plan the fleet, define each agent’s scope tightly
  2. Spawn the fleet, create worktrees, launch agents
  3. Watch the fleet, periodic git log --all --graph to catch off-script agents early
  4. Integrate, merge or cherry-pick each agent’s work into integration branch
  5. Catch semantic conflicts, the unique multi-agent skill (see below)
  6. Push gate, only the lead pushes integrated work to main
  7. Cleanup, remove worktrees, delete branches

Code merges cleanly. Tests may pass individually. But the integrated code is BROKEN because two agents had inconsistent mental models (renamings, duplicate utilities, mismatched field names, behavior changes one agent didn’t expect).

Git CANNOT detect these. They cross file boundaries without producing line-level conflicts.

Three layers of defense:

  1. Tight agent scope, reduce overlap to reduce conflict surface
  2. Integration tests at each merge step, catches the file-boundary failures
  3. Lead reads the integrated diff, catches what tests miss

The lead-stage build (full-system, after all merges) is the most important guardrail. The Clawless 2026-06-04 sprint: per-agent tests passed cleanly; the lead-stage build caught ~300 latent breakers. Per-agent tests are necessary but not sufficient.

Git stores snapshots. Every other command is just navigating those snapshots.

Multi-agent integration is just combining snapshots from N branches into one coherent integration snapshot. Git handles the syntactic combination; the lead handles the semantic combination.

L15 (AI-authored commits and PRs) zooms in on individual commits when an AI is the author. Co-authorship conventions. The “Generated with Claude Code” marker. What human review changes when the diff was AI-typed. Release notes.