Skip to content

Build Not yet confirmed elsewhere1 publisher 3 min read Published

Five coding agents on one repo is a staffing problem, and worktrees only fix the filesystem

A near-miss in one developer's repository: an agent planned a production build from a branch that only looked authoritative. What stopped it was a peer agent, and then written rules.

The Engineer · Build desk

Send a correction

What happened

  • A developer running 3 to 5 Claude Code sessions on the same microservices found he was managing a team rather than a toolchain.
  • One session announced a frontend build of version 1.0.399 based on main, but production's authoritative branch was a separate deployment branch that main trailed badly.
  • The other session warned it off; the build was halted before any push, and the changes were cherry-picked onto the deployment branch instead.
  • The agents settled it between themselves over session-to-session messages, and the human read about it afterwards in the logs.
  • The write-up sets out seven operating rules drawn from that run, covering worktrees, directory ownership, tag reservations and deploy state.

Why it matters

  • What it limits constraint Per-session worktrees cap file collisions and leave the registry tag space, the base-branch convention and cluster state unguarded, so those namespaces set your ceiling on concurrent agents, not...
  • Who's exposed exposure An agent with build and deploy rights can regress production while every line of its diff is correct, because the mistake is in the base it started from rather than the code it wrote.
  • Who has to decide decision Anyone adding a fourth or fifth agent now has to decide whether coordination lives in prose the agents may or may not read, or in structure the repository enforces.
  • What it sets up precedent The move that generalises beyond this stack is keeping deployed state in version control, which makes agent coordination a read of the repo rather than a conversation.

A git worktree per session buys separation of working files and not much past that [7][18]. Everything that broke, or nearly broke, sat in a namespace the worktree does not cover [18]. Container image tags are global to the registry, so two sessions building different content as 1.0.399 produce a silent overwrite, and the author reports a chained command error that pushed new content onto an old tag, so the behaviour survived the rollback [11]. Branch authority is the same class of shared fact: main looked like the base and was not, because production tracked a dedicated deployment branch that main trailed by dozens of versions [3].

Read the near-miss as an operations failure rather than an agent failure. Session B's plan was internally coherent, which is to say it announced a frontend build of 1.0.399 from main [2], and it was wrong only because of a repository convention that had never been written anywhere the agent could read it [13]. Session A caught it, B stopped before pushing and cherry-picked onto the deployment branch instead [5], and the human found out afterwards from the logs [6]. A correct diff on the wrong base would have taken weeks of shipped features out of production [4].

The arithmetic decides how far any of this scales. Coordination is pairwise: three sessions have three channels to keep straight, five have ten [17]. Going from three agents to five roughly triples the number of relationships every rule has to hold across, while the cost of adding each agent stays flat. That curve is why human teams grow process, and the recipes here are that process. Territory is assigned by directory, with talk components to the voice session, broadcast to streaming, and callgw to the phone session [8]. Shared trees get a hard check of branch and git status before any commit, adopted after one session nearly committed another session's staged changes [9].

The item I would lift out of the seven [15] is the shape of the stand-up. Sessions declare not only the files they will touch but the ones they will not, and the author credits that second half with nearly eliminating file conflicts [10][20]. Declaring intent is cheap. Declaring abstention is what lets a peer keep working without asking permission. It is also the only outcome the post reports, and it is a qualitative one [20].

The durable fix is the ledger. Put what is running where into Kubernetes manifests and commit the tag update with each deploy, and any session can read the current state out of the repository instead of querying the cluster [14]. A registry check by API before deploying does the same job for tags [12]. Both moves convert an ambient fact into a versioned one, which is the only form a peer with no memory of yesterday can be trusted to read. This is one team's operating experience, originally published in Japanese and carried on dev.to as a follow-up to an earlier piece on worktrees [16], and it comes with no collision counts on either side of the rules.

What to watch

  • A published count of collisions before and after the rules, which would turn a good anecdote into something you can size a policy against.
  • Whether the recipes still hold above five concurrent sessions, or whether the shared namespaces cap useful concurrency first.
  • Whether declarations move from free text into a schema the repository enforces, so no session can build without naming its base branch and tag.

Clarity's read

What the record supports and how the coverage leans. The claims behind it follow.

Reality

Evidence38
Adoption16
Hype gap+22
Incentives34
Confidence46
Why these scores

Claim ledger

Ranked by verification strength, evidence, and original report placement.

  1. [1]

    The author ended up with 3 to 5 Claude Code sessions simultaneously developing the same microservices, which he describes as having become actual team development rather than parallel execution of tools.

    Reported SupportedView cited source
  2. [2]

    Session B (streaming) messaged that it was about to build the frontend as version 1.0.399 based on main, while Session A (voice) was mid-refactor.

    Reported SupportedView cited source
  3. [3]

    In that repository the authoritative branch for production was not main but a dedicated deployment branch; the latest features from the past few dozen versions existed only in the deployment branch, and main was outdated.

    Reported SupportedView cited source

Get this ledger inside ChatGPT. Ask about any of our stories and the answer brings its figure, each claim’s verdict and the sources. Free, no account.

Add to ChatGPTAdd to Claude

Sources

1 independent publisher whose own reporting we read for this story.

  1. dev.to

    1 article · August 26, 2026

    Running Claude Code in 4 Parallel Sessions Led to 'Team Development' — 7 Recipes to Prevent Collisions

Share your take

Let Clarity write the post for you.

Signed-in readers get a short post drafted on this story in the register they choose — narrative, analytical, or a direct position — editable to the last word before it goes anywhere. The share buttons at the top of this story work without an account.

Topics and entities

Follow any of these and your For You feed starts watching them — no settings page required.

Topics

  • Multi-agent coding workflowsFollow
  • Declarative Environment StateFollow
  • Git worktree isolationFollow
  • Container Registry HygieneFollow
  • Agent Deployment SafetyFollow
Loading related stories