GuidesUpdated

How to run multiple coding agents without losing track

Split one task between two coding agents with clear ownership, separate worktrees and ports, attention checks, and a single final review decision.

On this page

Two agents only speed up a task if you can check and combine their work. Before opening another tab, define each agent's result, checkout, and reviewer. Then track which session needs you, where services run, and the final diff.

Canopy agent workspace with its files, diff, and pull request context
Canopy agent workspace with its files, diff, and pull request context

Give each agent a different deliverable

Say a settings form fails after an API timeout. Agent A owns the form's retry behavior on a feature branch. Agent B investigates the API failure and reports a testable finding without editing A's files. A person owns acceptance: a failed save shows an error and allows retry, a successful retry persists after reload, and profile data is unchanged. If both agents need to redesign the same API contract, pause one until a single owner decides.

A small division of work with one integration owner.
OwnerCheckoutOutputStop point
Agent Afeature/settings-retry worktreeForm fix and focused UI testShow running retry flow and diff
Agent BSeparate investigation checkoutCited API finding and failing-path test ideaReport evidence before changing shared API code
Human reviewerFinal integration branch or PRAccepted behavior and merge decisionCheck latest diff, tests, and live result

Give each code change its own worktree

Open a separate Git worktree and branch for each independent change; a second terminal tab doesn't isolate files. In Canopy, confirm each session's component, working directory, and branch before sending the task, and say so if a session is read-only. Worktrees prevent overwrites, not conflicting decisions or later merge conflicts. The worktree guide has setup and cleanup commands.

Let agents share facts, not authority

Use shared project context and direct agent messages to pass one bounded fact, such as 'the API returns 409 when the token expired.' Resume, events, context, and attribution vary by CLI, as the integration audit shows. A message doesn't merge conversations, switch branches, or share a provider account. Keep the brief and acceptance criteria where both sessions can read them.

Watch attention and services while they work

Check which session is waiting for a decision, which is running a command, and which is done. Match each prompt to its project, branch, and last output before replying. If both worktrees run a website, give each its own port and preview URL; a working tab on the wrong branch is misleading. The Agents rail and Servers and Preview panels connect these signals, but a badge doesn't prove the app works.

Integrate once, then review the combined result

Open each agent's workspace to inspect files, commits, diff, and PR. Bring the finding to the implementation owner and decide whether it needs another change. Merge or cherry-pick once branches are stable. Run the success and timeout/retry paths on the integrated checkout, then check the latest diff and checks. Resolve overlapping edits by intended behavior, not whichever side is easier.

Pick models to fit each job

A smaller model may be enough to classify an error. A stronger model or separate reviewer may help with a risky change; compare finished outcomes, not assumed costs. Each CLI keeps its own model, account, and limits, and Canopy doesn't pool billing. To judge whether two agents helped, record attempts, review time, and the accepted result.

Copyable resources

Two-agent task board

Fill this in before launching the second session; one card per independent output.

Shared acceptance: [observable success and error paths]
Agent A: [output], [checkout/branch], [files or behavior owned], [stop point]
Agent B: [output], [checkout/branch], [read-only or edit scope], [stop point]
API or design decision owner: [person]
Service and preview per checkout: [command, port, URL]
Attention check: [project, branch, question, next owner]
Integration order: [ ]
Final evidence: [combined diff], [test results], [running success/error paths], [PR decision]

Frequently asked questions

Can two agents edit the same repository?

Yes. For independent code changes, give each agent its own Git worktree. Check file claims and the integrated result before you merge.

Can agents use different models?

Yes. Each CLI runs in its own session and controls its own model choice. Canopy shows supported usage side by side. It doesn't route or bill models.

More questions and answers →

Sources and further reading