Shared State Needs One Writer
A finance team prepares a quarterly regulatory filing with three agents: one gathers figures from the ledgers, one drafts the narrative, one reviews the draft against the filing rules. On Monday morning the lead decides to use the restated second-quarter figures. The gathering agent hears and pulls a fresh extract; the drafting agent does not, and writes section 3 around the old one. The reviewer jots "this number looks high" in a shared notes file, and the drafter reads the note as a confirmed error and rewrites a paragraph that was right. By Tuesday the status page says section 3 is done, and nobody can say which version of it belongs in the filing. Every agent did careful work. Nothing decided who may write the shared state, so no agent's view of the work was the shared one.
Thesis: Coordination context is what agents share to stay aligned: who owns what, what is done, and what was decided between them. It fails when every agent writes its own summary of the truth into a shared place. Give each shared item exactly one writer or an append-only log, derive status from it at the moment it is read, and share decisions and references, never working context.
TLDR
Step 1 of 2
Shared State Needs One Writer
Three agents share a notes file, and nobody decided who may write the shared state.
The reviewer's passing doubt lands there, and the drafter reads it as a confirmed error.
Read the TLDR as text
- Shared State Needs One Writer. Three agents share a notes file, and nobody decided who may write the shared state. The reviewer's passing doubt lands there, and the drafter reads it as a confirmed error.
- What the Filing Agents Share, and What They Do Not. Only decisions and references should cross between agents. The ledger gets the lead's decision and the agents' own events. The reviewer's hunch stays with the reviewer.
When Context Turns Against You set a rule for one agent: check a record against the artifact, never against another copy of the record. Put several agents on the same work and the record has several would-be writers. This chapter is about who gets to write it, worked through on the filing above.
Why Run Several Agents at All
Until now this series has followed one agent. Teams add more for three reasons. Parallel work: three sections drafted at once instead of one after another. Separate judgment: a reviewer that did not write the draft does not share the drafter's assumptions, which is the case Subagents: Fresh Eyes on Demand makes. A window per job: each agent's window holds only its own task, the isolation lever from How an Agent Builds Its Context.
Each reason buys something real, and each creates the same new problem. The agents must share some context to stay aligned, and something has to decide who may write it.
What Coordination Holds
Coordination is the kind of context that exists because more than one agent is working. A single agent has direction, law and its own working context. Add a second agent and a new kind appears, with three parts.
- Ownership. Who is responsible for each piece of the work right now. One row per piece, one owner per row.
- Progress. What has happened: started, handed off, finished, failed. Events, in order.
- Shared decisions and findings. What the agents have agreed, or found, that the others must build on. Each with the evidence it rests on.
It also excludes something. Each agent's tool results, scratch reasoning and hypotheses are working context and stay with the agent. What crosses between agents is a decision or a reference, not the reasoning that produced it. The reviewer's "looks high" was working context that crossed without becoming a finding.
In Four Kinds of Context terms, ownership and progress live for one work stream and are worked out again from the log when read. Shared decisions last longer: cited, but checked again at use.
Status Is Derived, Never Written
The most common coordination artifact is a status document: a markdown file or a wiki page that every agent reads before working and updates after. It is easy to start and it fails slowly.
In January this site recommended exactly this. .ctx: Memory for Amnesiac Agents, a post about giving agents a shared project file, proposed one with an ownership table, a status dashboard, locked decisions and a communication log. Most of that still holds. The status dashboard does not: a status written into a document goes stale silently, the way When Context Turns Against You shows any record can. The rule that replaces it is the one The Loop Is a Ledger, Not an Orchestrator states: status is derived from the ledger, never stored.
The difference is who writes. A status document has many writers, each restating the state of the work from its own view at its own moment. A ledger has events, each appended once by the agent that caused it, and status is computed by reading them. A restatement can be wrong and look right. An event either happened or it did not.
| Status document | Append-only ledger | |
|---|---|---|
| Writers | Every agent, overwriting | Each agent appends its own events |
| What is stored | A summary of the state | What happened, in order |
| Status | Read from the summary | Derived from the events at read time |
| When two agents disagree | Last writer wins, silently | Both events are visible; the conflict is a fact |
| What goes stale | The whole document, gradually | Nothing: old events stay true about the past |
A Worked Example: The Filing's Ledger
Here is section 3's part of the filing ledger, one line per event, as it stood on Tuesday. The ids are invented.
{"seq":1, "by":"lead", "type":"assigned", "section":3, "owner":"drafter"}
{"seq":2, "by":"gatherer", "type":"gathered", "section":3, "extract":"EXT-311"}
{"seq":3, "by":"lead", "type":"decided", "id":"D2", "text":"use the restated Q2 figures", "memo":"MEMO-17"}
{"seq":4, "by":"gatherer", "type":"gathered", "section":3, "extract":"EXT-312", "basis":"D2"}
{"seq":5, "by":"drafter", "type":"drafted", "section":3, "revision":"r4", "from":"EXT-311"}
{"seq":6, "by":"reviewer", "type":"reviewed", "section":3, "revision":"r4", "issues":2, "review":"REV-88"}
Nothing in it says "done". Status is worked out when someone asks, by a few lines of code anyone can read:
// The status of one section, derived from the ledger at the moment it is asked for.
function status(events, section) {
const mine = events.filter((e) => e.section === section);
const last = (type) => mine.filter((e) => e.type === type).at(-1);
const gathered = last('gathered'), drafted = last('drafted'), reviewed = last('reviewed');
if (!drafted) return gathered ? 'gathered, not drafted' : 'not started';
if (!gathered) return 'drafted, but no extract is on record';
if (drafted.from !== gathered.extract) return `stale: drafted from ${drafted.from}, latest extract is ${gathered.extract}`;
if (!reviewed || reviewed.revision !== drafted.revision) return 'drafted, not reviewed';
return reviewed.issues ? `reviewed, ${reviewed.issues} issues open` : 'ready';
}
For section 3 it returns "stale: drafted from EXT-311, latest extract is EXT-312". That is the opening's failure, found by reading the events instead of trusting a page. The status page said done because the last agent to touch it thought so. The ledger cannot say done, because the draft was built on an extract the lead's decision replaced, and both facts are in it.
Two practical questions remain. How does an agent append? Through one tool, say append_event, that the harness implements. The tool stamps the sequence number and the author itself, so no agent can write as another; it accepts only the event types that agent may write, so the drafter can append drafted and not decided; and it never rewrites a line. One writer per item is then enforced by code rather than asked for in a prompt, the line Hooks Are a Channel, Not a Rule draws. Where does the ledger live? Anywhere that appends and reads back in order: a file in the repository, a database table, or the ticket system's own history, which is often best because it is already the system of record.
One Writer per Item
Not everything shared can be an event log. Ownership tables and shared decisions are records that change. For those the rule is narrower: one writer per item. In the filing, only the lead writes the ownership table and the list of decisions; the agents propose.
Applied to delegation, the rule looks like this. A delegated agent starts with its own fresh context, seeded from the parent's brief, not shared write access, and only two things merge back: the decisions it published and a summary it returns, through one writer on the parent. The summary comes back as derived context that may inform the parent and never overrule it. Anthropic's write-up of its multi-agent research system (2025-06-13) suggests a similar route, as a tip for some kinds of output: subagents "store their work in external systems, then pass lightweight references back to the coordinator", to avoid a game of telephone.
One writer also makes agreement meaningful. When Context Turns Against You showed that two agreeing copies are not corroboration. Two agents copying the same claim into a shared file have not confirmed it. They have repeated it. A single writer, with the evidence attached, is the only way to know whose claim it is.
The same rule decides what each reader holds: a copy or a position. An everyday picture helps. A copy is a printed timetable someone handed you last week: it looks authoritative, and nothing on it says it has changed. A position is a note of which version of the timetable you last read, plus the habit of checking the departure board before you leave. In agent terms, a copy is the shared state held in the agent's own context, refreshed only when an update notice arrives; a position is the version number it last read, with the record itself read again before it acts.
Step 1 of 5
Every agent did careful work.
On Monday morning the lead decides to use the restated second-quarter figures. The gathering agent hears and pulls a fresh extract; the drafting agent does not, and writes section 3 around the old one.
Read this figure as text
Shared record: one writer, v2 current.
Each agent keeps a copy
- Agent A: copy says v2. From the shared record: notice and new copy.
- Agent B: copy says v1. From the shared record: notice lost.
Each agent keeps a position
- Agent A: last read v2. Agent A reads before acting.
- Agent B: last read v1, re-reads, gets v2. Agent B reads before acting.
Follow agent B.
- Every agent did careful work. On Monday morning the lead decides to use the restated second-quarter figures. The gathering agent hears and pulls a fresh extract; the drafting agent does not, and writes section 3 around the old one.
- The same rule decides what each reader holds: a copy or a position. In agent terms, a copy is the shared state held in the agent's own context, refreshed only when an update notice arrives; a position is the version number it last read, with the record itself read again before it acts.
- Follow agent B. With a copy, one lost notice means it acts on v1, and nothing inside the copy says the copy is old. With a position, the same lost notice only means its position is behind; the re-read before acting gets it v2.
- In the filing, the drafter held a copy of the plan from Monday morning. With a position it would have re-read the decisions before drafting, met D2, and asked for the new extract.
- Status Is Derived, Never Written A restatement can be wrong and look right. An event either happened or it did not.
section 3's part of the filing ledger
- 1 lead assigned section 3, owner drafter
- 2 gatherer gathered section 3, extract EXT-311
- 3 lead decided id D2, text use the restated Q2 figures, memo MEMO-17
- 4 gatherer gathered section 3, extract EXT-312, basis D2
- 5 drafter drafted section 3, revision r4, from EXT-311
- 6 reviewer reviewed section 3, revision r4, issues 2, review REV-88
stale: drafted from EXT-311, latest extract is EXT-312
The figure is a schematic of the rule, not a measurement. The ids are invented.
Figure: Copies against positions. With copies, agent B misses one notice and acts on v1 with nothing telling it the copy is old; with positions, both agents re-read the one shared record before acting and get v2.
Follow agent B. With a copy, one lost notice means it acts on v1, and nothing inside the copy says the copy is old. With a position, the same lost notice only means its position is behind; the re-read before acting gets it v2. In the filing, the drafter held a copy of the plan from Monday morning. With a position it would have re-read the decisions before drafting, met D2, and asked for the new extract. The figure is a schematic of the rule, not a measurement.
A re-read fixes a lost notice. It does not fix a race. If agents A and B both read v2 and each proposes a change built on it, each proposed correctly from what it read, and the second change still overwrites or duplicates the first. So the write that follows a read has to be conditional on the version read: the one writer accepts a change only if the record is still at that version, and otherwise rejects it, so the agent reads again and decides again. That is a compare-and-swap. Work an agent takes on is claimed the same way, with a lease that expires, so a second agent finds it taken and a crashed one does not hold it for good.
Isolate the Work, Share the Decisions
Two well-known positions on multi-agent systems seem to disagree, and the kinds reconcile them. Cognition argued (2025-06-12) against subagents working from isolated context, because "Actions carry implicit decisions, and conflicting decisions carry bad results", and later narrowed the claim (2026-04-22): such systems work best "when writes stay single-threaded and the additional agents contribute intelligence rather than actions". Anthropic's research system ran parallel subagents with their own windows and reported, on its own internal evaluation, better results than a single agent, at about 15 times the tokens of a chat.
Cognition's failure is unshared decisions: each subagent made a choice the other never saw, as the drafter never saw D2. Anthropic's success is isolated working context: each subagent explored without dragging the others' reasoning along. So isolate working context by default, and share decisions explicitly, before the work that depends on them starts. Where the work is so coupled that every step is a shared decision, use one agent.
What the Filing Agents Share, and What They Do Not
Typed as coordination, the filing's shared context is small. An ownership table, one row per filing section, written only by the lead analyst who assigns the work. The ledger of events above, where each agent appends only its own. A short list of shared decisions, written only by the lead: "use the restated Q2 figures", with the memo it rests on.
What is not shared is just as deliberate. The reviewer's notes while it read section 3 ("this number looks high, check the FX rate") stay its own until it either confirms them as an issue in the ledger, with evidence, or drops them. The drafting agent never sees the reviewer's hunch as a fact. When the lead asks where the filing stands, the answer is computed from the ledger, not read from a page anyone last edited on Tuesday.
When the Opposite Wins
A shared status document is fine for a team of two agents and a human who reads it every hour. The ledger and the single-writer rule cost structure, and structure is overhead when the work is small, short or watched closely. The shared file .ctx proposed worked for the small projects it was written for.
One shared record is also a single point of failure: if the file is wrong, every reader is wrong together. The answer is to keep the log of decisions the shared record was built from, so it can be re-derived from it rather than trusted as the only copy.
Isolation has its own failure, too. An agent that shares only decisions can still act on an assumption it never thought to state, which is exactly Cognition's warning. The single-writer rule says whose claim a record is; it does not make anyone state the claim. For tightly coupled work, the honest answer is often fewer agents, not better coordination between more of them.
And the event log is only as good as what agents choose to append. If nothing makes an agent write its findings where the others will read them, every durability step is opt-in and competes with the work at the moment the work is hardest. A ledger nobody writes to coordinates nothing.
What to Do Next
- Separate the three parts. Split your shared context into ownership, progress and shared decisions. They change at different rates and need different writers.
- Replace the status page with a log. Have each agent append the events it causes, with the id of what it produced, and compute status from the log when someone asks. Start from the
statusfunction above, adapted to your events. - Enforce the writer in the tool. The append tool stamps the author and accepts only the event types that agent may write.
- Give readers positions, not copies. Each agent records the version it last read and reads the shared record again before it acts on it. A re-read does not stop two agents acting on the same version, so make each write conditional on the version read (compare-and-swap) and claim work with a lease that expires.
- Share decisions before the work that depends on them. When two agents will build on the same assumption, write it as a shared decision first, with its owner.
- Keep hunches private. An agent's working notes reach the shared record only as a finding with its evidence attached.
- Count your re-derivations. If parallel agents keep finding the same thing, the missing piece is a shared findings store, not a smarter agent.
Next: Working Context Is Disposable, the working context each agent keeps to itself: rederived, written down before a boundary, promoted only on purpose, and otherwise let go. Related reading: The Loop Is a Ledger, Not an Orchestrator for status derived from events; .ctx: Memory for Amnesiac Agents for the January coordination file; Hooks Are a Channel, Not a Rule for enforcing one writer in the harness rather than asking for it; and Subagents: Fresh Eyes on Demand and The Multi-Agent Illusion for what isolation does and does not give you.