Multi-agent development: run a team of agents, keep the repo

Starting four coding agents is easy. Keeping their tasks independent, their credentials narrow, their development servers separate, their diffs reviewable, and their merges coherent is the actual work. Multi-agent development succeeds when concurrency is treated as a queueing and integration problem rather than a model feature.

By the Continuum team. We build a workbench that runs Claude Code, Codex, and their peers, so the model rates quoted here are the ones our own cost analytics ship with.

The short version

A reliable multi-agent workflow gives each task one owner, one acceptance gate, one branch, and one git worktree. It limits active work to the number of diffs the team can review, isolates ports, databases, caches, and credentials as deliberately as files, and merges through a single integration queue. Agents may coordinate through a lead, shared task list, or workbench, but no agent should silently own merge authority. The throughput ceiling is accepted review, not the number of model sessions you can start.

What you need to know
  • One agent gets one bounded task, branch, worktree, and proof bundle.
  • The WIP limit is set by review capacity, not available subscriptions or CPU cores.
  • Worktrees isolate files and branches, but not ports, databases, secrets, caches, or external services.
  • Tasks must be partitioned by ownership boundaries, not divided into overlapping file lists.
  • Every lane returns the same artifact: plan, diff, checks, risks, and handoff.
  • Merge remains a human-controlled integration queue with tests rerun after each dependency lands.

The throughput equation nobody puts on the agent dashboard

Multi-agent development is usually sold with a screenshot of many sessions running. Running is not the output. Accepted, integrated changes are the output. If four agents each produce a thirty-minute diff and one reviewer needs forty-five minutes per diff, the system creates work faster than it can finish it. The queue grows while the dashboard looks productive.

RateMeaningFailure signal
Agent start rateHow many tasks enter active workEasy to maximize and mostly irrelevant
Agent completion rateHow many lanes claim they are doneCan rise while quality falls
Review rateHow many diffs a human can understand and acceptThe usual bottleneck
Integration rateHow many accepted diffs land cleanly with the full suite greenFalls when tasks share contracts or infrastructure
Rework rateHow many landed changes reopen within daysThe delayed signal that parallelism outran understanding

Set the active-agent limit from review, not compute. A useful starting rule is one active implementation lane per available reviewer, plus one read-only research or verification lane. Raise the limit after a week only if completed diffs are reviewed the same day, merge conflicts remain low, and rework does not climb.

Partition work by ownership, not by enthusiasm

Parallel tasks must be independent enough to merge in either order or have an explicit dependency. “Agent A does the backend and Agent B does the frontend” is not independent if both invent the wire contract. “Agent A defines and tests the additive API contract; Agent B starts after that commit and implements the client” is a dependency the system can schedule.

Good parallel splitBad parallel splitWhy
Two unrelated bug fixes in separate modulesTwo agents refactoring the same shared utilityFile and semantic overlap create conflict
Read-only investigation beside implementationTwo implementations of one requirement on the same branchResearch returns evidence without mutating the work surface
Platform clients after a shared contract is fixedEach client invents its own field and semanticsOne contract prevents drift
Tests for stable public behavior beside internal refactorTests written against an interface still being redesignedStable boundary makes independent acceptance possible
Documentation after behavior and examples are settledDocumentation guessing while implementation changesAvoids parallelizing uncertainty

Every task brief needs six fields: outcome, owned surface, explicit exclusions, dependency base, acceptance command, and reviewer. The owned surface may name modules or packages, but the stronger boundary is behavioral: this lane owns the parser and its tests; that lane owns the UI consumer after the parser contract lands. File lists alone miss generated files, shared types, and call sites.

A task card that can safely enter a parallel queue.
OUTCOME: Reject expired session tokens before route handlers run
OWNS: auth middleware + middleware tests
DO NOT TOUCH: login UI, database schema, deployment config
BASE: main@abc123; depends on no other active task
VERIFY: npm test -- auth-middleware && npm run typecheck
REVIEWER: security owner; same-day review slot reserved

If the brief cannot state what the lane must not touch, it is not ready for parallel execution. Put it in planning, not in another worktree.

One branch and one worktree per implementation lane

Git worktrees let one repository expose several checked-out branches at the same time. Each path has its own index and working tree while sharing the object database. That is the right file-level primitive for parallel agents: no stashing, no checkout fights, and a diff attributable to one task.

A minimal two-lane setup from a clean main branch.
git switch main
git pull --ff-only

git worktree add ../repo-auth -b agent/auth-expiry main
git worktree add ../repo-docs -b agent/auth-docs main

git worktree list
git -C ../repo-auth status --short
git -C ../repo-docs status --short

The branch name should encode the task, not the model. Models change mid-session and do not explain the diff. Put model, agent version, prompt, and session identifier in the task record or handoff. Keep git history about repository intent.

A worktree is a collision boundary, not a process sandbox. Both agents may still see the same home directory, SSH agent, Keychain, cloud configuration, package caches, Docker daemon, and localhost. Both may start a server on port 3000 or point migrations at the same development database. The next section exists because most multi-agent failures happen outside git.

Isolate the state git does not know about

Two clean worktrees can still corrupt each other's run through shared mutable state. Make the isolation map part of repository setup so every lane receives a unique namespace automatically.

Shared resourceCollisionIsolation pattern
Development portSecond server fails or tests hit the wrong buildAllocate a port from the task or derive one from a stable lane id
DatabaseMigrations and fixtures overwrite each otherDatabase or schema per lane; never point agents at shared staging
Redis / queuesJobs and cache keys cross lanesPrefix keys and queue names; separate container when cleanup is uncertain
Docker Compose projectContainer names and volumes collideUnique project name per worktree
Build cacheStale or incompatible artifacts appear in another laneCache key includes base commit, platform, and dependency lock hash
Package lockfileIndependent installs produce merge churnOnly the dependency-owning lane edits it; others use the pinned state
Generated codeTwo lanes rewrite the same outputOne generator owner or regenerate once after integration
Simulator / browser profileTests observe another lane's stateDedicated device, profile, or serial test queue

Repository setup commands should accept a lane identifier and print the allocated resources. An agent should not guess a free port or database name. Deterministic allocation makes failures reproducible and cleanup possible.

External services need the same treatment. Use a test tenant, task-scoped namespace, idempotency key, and credentials that cannot reach production. If a service cannot isolate concurrent test data, serialize that test at the integration queue. Parallelizing a resource that has no isolation primitive is not acceleration. It is nondeterminism.

Permissions and secrets in the multi-agent case

The site's AI coding agent security guide covers permission modes, sandboxes, prompt injection, secrets, and review for one agent. Multi-agent work multiplies identity and data-flow problems. A token copied into four lanes is four opportunities for misuse, four log streams that may capture it, and four processes that must be stopped when it is revoked.

  1. Separate capability by role. A research agent needs read-only repository access. An implementation agent needs workspace writes. A verifier should not need the implementation lane’s write token. None needs merge or deploy by default.
  2. Issue short-lived credentials per lane. Put the task id in audit metadata where the provider supports it. Revoke on completion rather than waiting for a shared developer token to expire.
  3. Keep secrets out of prompts and transcripts. Inject them at tool execution, redact output, and log the secret name rather than value.
  4. Restrict network destinations. A lane reading untrusted code should not have arbitrary egress and a broad cloud token at the same time.
  5. Protect shared instruction files. Project agent instructions, workflow scripts, and CI policy affect every lane. Changes to them need dedicated ownership and review.
  6. Do not let agents approve each other’s authority. One agent can review a diff, but it cannot grant another lane broader credentials or waive the human merge gate.

Worktree paths are untrusted input when they cross process boundaries. Validate paths before cleanup, server startup, or artifact upload. Never identify a process to kill from a broad name or path match on a machine hosting several agents. Capture the process identifier at launch, verify its working directory and owner, and terminate only that process.

Use an orchestrator for routing, not for hiding decisions

A lead agent, shared task list, or workbench can route tasks, monitor status, and collect results. That coordination is useful when it keeps ownership visible. It becomes harmful when the lead silently rewrites scope, launches overlapping work, or compresses every result into a confident paragraph that discards evidence.

Orchestrator shouldOrchestrator should not
Enforce the WIP limitStart every available task because a slot is idle
Check dependencies before dispatchAssume file separation means semantic independence
Create or assign the worktree and branchLet workers choose arbitrary shared paths
Preserve links to plans, logs, diffs, and checksReplace evidence with a summary only
Escalate ambiguity before implementationInvent product or architecture decisions to keep agents busy
Move work into a human review queueMerge because two agents agree with each other

Claude Code agent teams provide a lead, independent teammates, shared task lists, and direct inter-agent messages. Subagents are different: they run isolated context for a delegated subtask and return a summary to one parent session. Separate worktree sessions are different again: each is a full implementation lane with its own branch. Choose the least coordination machinery that fits the dependency graph.

A workbench such as Conductor or Continuum can make native agent sessions visible without turning one model into a sovereign project manager. Continuum runs supported agent CLIs as separate sessions and worktrees; Conductor presents a dense Mac board. The useful feature is state you can inspect, not autonomy for its own sake.

Standardize the proof bundle from every lane

Review slows sharply when each agent reports completion differently. Require the same proof bundle regardless of vendor or model. The bundle is a contract between implementation and review.

ArtifactRequired contentReviewer question
PlanIntended files, contract changes, verification, exclusionsDid the lane solve the assigned problem?
DiffOnly task-scoped changes, with generated output identifiedCan I explain every changed line?
ChecksExact commands, exit status, and focused resultWas the relevant behavior exercised?
Risk noteSecurity, data, compatibility, migration, and unverified surfacesWhat could still fail after green tests?
HandoffBase commit, branch, commits, dependencies, conflicts, cleanupCan another person integrate this without the session?
The minimum handoff format.
TASK: auth-expiry
BASE: abc123
BRANCH: agent/auth-expiry
CHANGED: middleware.ts, middleware.test.ts
VERIFY: npm test -- auth-middleware (pass); npm run typecheck (pass)
RISKS: clock-skew behavior unchanged; integration suite not run
DEPENDS ON: none
DO NOT MERGE WITH: active session-cookie refactor
CLEANUP: server pid 4821 stopped; test database auth_expiry_42 dropped

A screenshot is required when the acceptance claim is visual. A command transcript is required when the claim is behavioral. A statement that tests pass without the command and exit status is not evidence. The proof should be cheap enough that every lane produces it, which means focused checks first and the full suite at integration.

Review in two passes

Review agent output in two passes because intent and implementation fail differently. The first pass asks whether the change belongs. The second asks whether the code is correct.

  1. Scope pass. Compare the brief, plan, and file list. Reject unrelated cleanup, new abstractions without a requirement, dependency changes without ownership, and deleted behavior the task did not authorize.
  2. Correctness pass. Trace inputs, state changes, errors, concurrency, authorization, and cleanup. Read deletions as carefully as additions. Run the focused checks yourself when risk warrants it.
  3. Adversarial pass for sensitive code. Use a fresh read-only reviewer for auth, billing, data deletion, secrets, networking, and deployment. Give it the diff and threat or invariant, not the implementation conversation.
  4. Product pass for UI. Run the built artifact, exercise the path, and capture proof. Static code review cannot confirm layout, focus, loading state, or device behavior.

Do not ask the implementing agent “is this correct?” and count its answer as review. It shares the assumptions that produced the diff. A fresh agent can help find issues, but a human still owns acceptance and merge authority.

Keep reviews small by rejecting oversized tasks before implementation. Once a lane returns 2,000 changed lines, the team faces a bad choice between slow review and shallow review. Task size is a safety control set upstream.

Merge through one integration queue

Parallel branches become a product only after integration. Use one queue with explicit ordering. A branch is rebased or updated against the current integration base, its focused checks rerun, then the shared suite runs after merge. If another active lane depends on a contract, publish the contract commit first and rebase the dependent lane before it continues.

01

Freeze the lane

Stop new edits once review starts. Any fix becomes a visible follow-up commit and reruns the affected checks.

02

Update from the integration base

Rebase or merge according to repository policy. Resolve conflicts with the task owner present; a clean textual merge can still be a semantic conflict.

03

Rerun focused proof

The original green result applied to the old base. Run the task gate again after updating.

04

Land one change

Keep merge ordering observable. Do not land a batch of dependent agent branches and diagnose the combined failure afterward.

05

Run shared gates

Typecheck, integration tests, schema checks, generated-file checks, and platform builds run on the integrated state.

06

Release dependent lanes

Rebase queued work on the new base and rerun its focused gate before review resumes.

Human merge is a durable control because it marks where accountability transfers from a disposable lane to the shared product. Branch protection, required checks, and code ownership should enforce that boundary even if the workbench offers a one-click PR button.

Failure modes that look like agent problems

SymptomLikely system causeFix
Agents repeatedly edit the same filesTasks were split by ticket label, not ownership boundarySerialize the shared contract or assign one owner
Tests pass alone and fail togetherShared database, port, cache, clock, or fixture stateNamespace the resource and add an integration test
Ready-for-review queue growsWIP exceeds reviewer capacityStop dispatch, swarm review, lower the lane limit
Merge conflicts rise late in the dayBranches stayed active too long against a moving baseUse smaller tasks and publish dependency commits earlier
Quota disappears without accepted workAgents explore vague tasks or duplicate researchAdd a read-only planning lane and tighter briefs
One lane kills another serverProcess management used broad name or path matchingCapture PID at launch and verify ownership before termination
Secrets appear in transcriptsCredentials were passed through prompts or verbose outputInject at execution, redact, rotate, and narrow scope
Two agents agree on a flawed changeShared context or copied assumptionsUse a fresh reviewer with the invariant and diff only

These failures are coordination defects. Changing models may move their frequency but does not remove the mechanism. Fix task shape, isolation, proof, review, or queue policy first. A stronger model in the same broken system can generate the bad queue faster.

Metrics that tell you whether parallelism works

Measure one-agent baseline before claiming a multi-agent gain. The useful unit is a completed, accepted task of similar size.

MetricHealthy directionWhat it diagnoses
Lead time: task ready to mergedDownThe actual throughput result
Queue time: done to review startNear zeroWhether WIP exceeds review capacity
Review minutes per accepted taskStable or downDiff quality and task size
Rework within seven daysStable or downWhether shallow review is hiding defects
Merge conflicts per taskDownTask independence and branch lifetime
Agent cost per accepted taskDownPrompt precision, duplicate work, model routing
Human interventions per taskDown without rework risingHow much steering the lane needs
Abandoned lane rateLow and explainedPlanning quality and speculative work

Do not optimize token cost alone. A cheap lane that produces a rejected diff consumed model budget and review attention. Do not optimize completion rate alone. An agent can mark a task complete before acceptance. Tie every metric to merged work and delayed rework.

A simple weekly review is enough: which lanes waited, conflicted, exceeded scope, failed verification, or reopened after merge? Change one operating rule at a time. Multi-agent development is a production system, and production systems improve through observed constraints rather than a bigger spawn button.

A practical operating model from two agents to eight

StageAllowed concurrencyRequired controls before advancing
Stage 1One implementation + one read-only verifierTask card, clean branch, focused check, human merge
Stage 2Two independent implementation lanesSeparate worktrees, resource namespaces, same-day review slots
Stage 3Three to four lanes across modulesDependency graph, integration queue, proof bundles, cost view
Stage 4Five to eight lanes across a teamNamed dispatcher, reviewer rotation, credential automation, fleet and queue observability

Stay at the lowest stage that meets lead-time goals. Stage four is not maturity if stage two finishes the backlog with less coordination. More lanes are justified by independent ready work and reviewers, not by agent availability.

  1. Morning: triage ready tasks, confirm dependencies, reserve reviewers, and start only the WIP limit.
  2. During work: agents update machine-readable state such as planning, running, blocked, verifying, and ready. Blockers preserve exact commands and error text.
  3. Review: freeze the lane, inspect scope then correctness, run the proof, and return findings as a bounded revision.
  4. Integration: land one reviewed branch, run shared gates, then refresh dependent branches.
  5. End of day: stop processes, revoke lane credentials, preserve required artifacts, remove disposable worktrees only after clean-state checks, and account for every active branch.

Continuum and Conductor can reduce the manual bookkeeping around this model. Claude Code agent teams can coordinate related research and implementation. Plain terminal windows plus scripts can implement the same discipline. The tool is secondary. The invariant is visible ownership from task creation through teardown.

Questions people ask

A workflow where several coding-agent lanes work concurrently on one product under explicit task ownership, branch and worktree isolation, shared-resource namespaces, standardized verification, human review, and one integration queue.

Start with one implementation agent and one read-only verifier. Add a second implementation lane only when both diffs can be reviewed the same day. The limit is review capacity and task independence, not CPU cores or subscriptions.

Use a separate worktree and branch for every concurrent implementation lane. Worktrees prevent checkout collisions and make diffs attributable. Read-only research subagents may not need one if they cannot edit.

No. They isolate checkout and index state. Agents can still share ports, databases, caches, Docker, simulators, home-directory credentials, SSH agents, and network access. Namespace or sandbox those separately.

A fresh read-only agent is useful for adversarial review, especially when it receives only the invariant and diff. It does not replace human acceptance, and agents should not grant each other credentials or merge authority.

Through one visible queue. Freeze the lane, update it from the current integration base, rerun focused checks, land one reviewed change, run shared gates, then refresh dependent branches. Keep merge authority human-controlled.

Shared authority. Copying one broad token, home-directory environment, or production-capable identity into many lanes multiplies exposure. Give each lane task-scoped credentials, tools, writable paths, network access, and teardown.

Measure lead time to merged change, queue time before review, review minutes, rework, merge conflicts, and cost per accepted task against a one-agent baseline. The number of sessions running is not a throughput metric.

Sources

Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.

  1. git-worktree manual
  2. Claude Code parallel agents
  3. Claude Code worktrees
  4. Claude Code agent teams
  5. OpenAI Codex sandboxing
  6. OpenAI Codex agent approvals and security
  7. OpenHands Docker sandbox
  8. Conductor documentation
  9. Continuum Code workbench
Try it

More agents.
One visible queue.

Continuum gives every coding-agent session its own worktree and branch, then puts plans, diffs, PRs, status, quotas, and cost in one workbench across supported providers and devices. The app is free with your own plans.

free app · your subscriptions · local-first