Quanta

← Back to Briefings

Three Coding Agents, Three Worktrees, One Review Queue

Coding agents at scaleEN2 reads

01 · Three agents need three bounded assignments

For teams running coding agents throughout the day, parallel work promises shorter queues. It also creates more changes to review, more tests to run, and more token usage to fund. The useful starting point is three agents with separate assignments, separate working directories, and one explicit integration queue.

Choose tasks that can land independently: a contained bug fix, a test expansion, and a documentation update, for example. Give each agent an acceptance condition, an allowed scope, and the checks it must run. If two assignments require incompatible edits to the same interface, settle that interface first.

02 · Use git worktrees to separate branches and files

A git worktree gives another branch its own working directory while sharing the repository’s object database and references. Each agent gets its own checked-out files and index, so one agent’s edits and staging operations do not disturb another’s workspace. This avoids the hazards of several agents editing one checkout.

Start from an agreed base commit. From the existing repository, create a branch and directory with git worktree add -b agent/fix-timeout ../agent-fix-timeout HEAD. Repeat with distinct branch names and paths for the other assignments. Git normally prevents the same branch from being checked out in multiple worktrees.

Launch each agent from its assigned directory. Put the task brief and repository instructions within reach, and require a completion report covering changes, checks, and unresolved issues. Keep repository-wide maintenance, branch deletion, and integration under a designated owner.

03 · Separate ports, databases, and generated output

Worktrees isolate source files; they do not isolate the whole execution environment. Three development servers can still compete for one port. Test suites can overwrite shared fixtures, mutate the same database, or contend for a container name.

  • › Assign a distinct port and temporary output directory to each agent.
  • › Use separate test databases or schemas when tests change stored data.
  • › Install dependencies in each worktree as the project requires; share caches only where the tooling supports concurrent access.
  • › Scope credentials and external service access to each assignment’s needs.

Check scripts for assumptions about absolute paths or a single checkout. A hard-coded output directory can quietly undo the isolation that worktrees provide. For workloads needing stronger process or filesystem boundaries, run each worktree inside a separate container or sandbox.

04 · Make review capacity the concurrency limit

Three agents finishing simultaneously can overwhelm one reviewer. Set a limit on completed work awaiting review, and pause new assignments when that queue fills. More agent activity helps only while the team can validate and integrate the results.

Require each agent to commit its scoped changes and report the exact checks it ran. Review the diff for correctness, unnecessary edits, dependency changes, and missing tests. An agent’s successful local test run is evidence, but the combined branch still needs validation.

Integrate one branch at a time through the team’s normal merge process. After each merge, update the remaining branches against the new base and rerun affected checks. Separate directories prevent workspace interference; they cannot prevent semantic conflicts between changes that looked compatible in isolation.

05 · Budget tokens for retries and integration

Budget each assignment for investigation, implementation, testing, and a bounded repair cycle. Track usage against accepted changes, including abandoned attempts and integration fixes. Several agents repeatedly exploring the same repository can consume substantial tokens before producing reviewable work.

Quanta fits teams that want a shared funding pool across supported models and coding clients. Its pay-as-you-go relay works with Claude Code, Codex, Gemini CLI, and clients using an OpenAI SDK. One balance can support assignments using Claude Sonnet 5.5 and GPT-6 Astra, for example. Choose models through representative task evaluations, then compare total usage and review effort.

Every call is metered on real tokens, with cache writes and cache reads priced separately. Include those categories in estimates rather than treating all context reuse as free. Open a Quanta account to fund a small parallel-agent pilot, then expand concurrency only when spending, review throughput, and integration quality support it.

06 · Retire worktrees after accepted changes land

Once a branch lands and its worktree contains no needed changes, remove it with git worktree remove followed by its path. Delete the branch according to team policy. Record accepted changes, total usage, and review delays from the pilot; use those observations to set the next concurrency limit.