Workspace Contention
Coordination conflicts when parallel sub-agents mutate shared state concurrently.
Two roommates keep their bills on the fridge door. On Tuesday morning one of them sees the electricity bill, thinks "I'll handle that," and pays it from her phone. That evening the other sees the same bill, still on the fridge, and pays it too. Each acted sensibly on what the fridge door said. It just didn't say that someone was already on it.
Agents hit this the moment they work in parallel. An orchestrator forks three sub-agents to speed up a refactor, and all three can write to the same repository, ticket queue or database. Each reads the shared state, reasons about it and writes back. If another agent changed that state in between, the write rests on a picture that is already out of date.
Human teams handle this with conversation, document locks and a glance at who else is editing. Sub-agents have none of that unless the tools provide it. Each sees only its own window.
In practice
Here is a minimal illustrative case: two sub-agents, one config file, a few seconds apart.
- T1
A: read_file("deploy.yaml")→ version 14, 38 linesA plans to add a timeout. - T2
B: read_file("deploy.yaml")→ version 14, 38 linesB plans to add retries. - T3
A: write_file("deploy.yaml", ...)→ okTimeout added. A reports done. - T4
B: write_file("deploy.yaml", ...)→ okRetries added. B reports done.B wrote its edited copy of version 14 over A's version 15. The timeout is gone, and both agents believe their change is live.
Notice that every call succeeded, and the change that disappeared belonged to the agent that finished first. Databases call this a lost update. The classic defense works for agents too: each write carries the version it was based on, and the tool refuses a write against a stale version.
write_file("deploy.yaml", base_version=14, ...)
→ conflict: deploy.yaml is at version 15 (sub-agent A added
"timeout: 30s"). Re-read with read_file("deploy.yaml") and reapply.
Why it matters
Contention failures are silent, which makes them expensive. Each agent's belief about the file now differs from the file itself, a gap the Guide calls world-model driftLexicon · 20World-Model DriftDivergence between the agent's internal beliefs and actual environment state., and no trace flags it. The bug surfaces later as a missing setting, a doubled payment or a ticket closed twice.
It also caps the speedup parallelism promises. Forking an agent into parallel selvesLexicon · 11Parallel SelvesA single agent user forking into multiple concurrent sub-agents. is only faster if their work doesn't collide. Without conflict detection, teams end up running the agents one at a time again, or adding a human merge step.
What to do about it
H-06 Deterministic Envelopes & Schema Uniformity puts a version on every read and write response, so there is always a base version to send back. H-11 Errors as Steering Prompts shapes the conflict response: what changed, who changed it, and the exact call that recovers. H-01 Continuous State Anchoring helps agents avoid the collision in the first place by surfacing live state, such as which files another agent currently holds.
Related
A file shared with sibling agents can go stale in seconds, so its context half-lifeLexicon · 18Context Half-LifeHow quickly an observation decays into staleness relative to reality. is far shorter than in a solo session. A brief that doesn't say which sub-agent owns what invites both contention and handoff lossLexicon · 46Handoff LossDisappearance of verified facts and rationale across compaction or delegation..