The Chief of Staff Sample
Long-horizon AI coding work fails much less as a result of brokers can’t write code and extra as a result of their context is ephemeral and their self-reports are unreliable. The repair is organizational somewhat than technical: one session coordinates and verifies whereas separate classes execute, a sturdy exterior board holds the state, and each declare is re-run earlier than it’s believed. The form is already often known as orchestrator-worker and coordinator-implementor-verifier. Chief of Staff is simply what we name it. This covers the loop, the tooling that makes it sensible, and the failure modes it exists to catch.
TL;DR
- Separate orchestration from execution. The coordinating session writes briefs, verifies claims, and reads diffs. It doesn’t do the implementation work.
- Put state in a sturdy retailer, not in context. A board, or any exterior process system with an API, survives compaction, session loss of life, and handoffs. Conversation context doesn’t.
- Treat each agent report as proof, not instruction. Re-run the instructions. Exit codes are authoritative, summaries are intent.
- Write to sturdy channels. Messages between classes could be delayed, held, or expire. A dedicated file or a board card all the time arrives.
- Timebox for surfacing, not for slicing. A set interval decides how typically you report, by no means the place the work stops.
- Distrust your individual devices. The costliest errors in agentic work come from checks that report success for work they didn’t do.
What drawback does this resolve?
A single AI coding session works nicely for an hour and degrades after that. Three issues go improper.
- Context is finite and lossy. Long classes get compacted. Details that mattered three hours in the past change into a abstract, and the abstract loses the specifics that made the element helpful.
- Self-reports drift from actuality. An agent that claims “assessments go” is reporting its intent and its recollection, not a recent statement. The hole between the 2 grows with session size.
- Nothing compounds. A lesson realized painfully at hour two is passed by the following session until any person wrote it down in a spot the following session reads.
Adding extra brokers doesn’t repair this. It multiplies it. Now you could have a number of unreliable reporters and nobody reconciling them.
What fixes it’s a division of labour borrowed from human organizations: somebody whose job is to not do the work, however to know what’s true.
This is similar self-discipline that separates a prototype from a shipped product. The technology step was by no means the bottleneck. The checking step is.
What is the Chief of Staff sample?
Chief of Staff is our title for an agent orchestration form through which one long-lived session acts as coordinator, assigning work, verifying claims, and sustaining shared state, whereas separate short-lived classes carry out the implementation.
If you need the quickest psychological mannequin, consider it as an integration supervisor. In Git’s integration-manager workflow, contributors work in their very own repositories and one maintainer pulls every change, assessments it domestically, and decides what lands within the reference repository. The coordinator does that job, for agent classes as an alternative of contributors.
The title is a metaphor we discover helpful. It shouldn’t be a longtime time period, and you shouldn’t have to acknowledge it. The form beneath it’s well-known and has a number of actual names.
What that is usually known as
- Orchestrator-worker, additionally supervisor or hierarchical orchestration.
- Coordinator-implementor-verifier (CIV).
- Maker-checker, or a validation chain, borrowed from finance and operations.
- Integration supervisor, the human model, documented in Git’s distributed workflows lengthy earlier than any of this. Its open-source variant is the benevolent dictator and lieutenants.
- Team lead and teammates, which is how Claude Code’s personal subagent documentation frames it.
They all say the identical factor: one agent plans and checks, others do the work, and shared state lives exterior any single context window. If you’re on the lookout for prior artwork, search these phrases somewhat than this one.
What this text provides shouldn’t be the form. It is the verification self-discipline additional down, and the precise failure modes that break lengthy autonomous runs.
One disambiguation
The phrase chief of employees agent is broadly used for one thing else: an assistant that runs an individual’s calendar, inbox, and priorities and routes work out to specialist brokers. Anthropic’s cookbook has a chief of staff agent of precisely that sort, constructed for the CEO of a startup. Same metaphor, completely different drawback. This article is a few coding loop.
The coordinator’s job
The coordinating session is typically known as the overwatch. Its obligations:
- Pull and assign work from a sturdy queue, in an outlined order.
- Write briefs {that a} weaker mannequin might comply with with out the coordinator’s judgment.
- Verify claims by re-running the instructions an executing session says it ran.
- Read diffs, not transcripts. What landed issues, what an agent mentioned about it doesn’t.
- Record classes in a sturdy artifact earlier than the session ends.
- Steer a session that’s drifting, with out taking the work away from it.
What it explicitly does not do is write the implementation. The second the coordinator begins coding, it stops verifying, and the sample collapses right into a single overloaded session.
The three elements
You want three issues. The particular instruments are replaceable, the roles will not be.
1. The agent runtime: Claude Code
Claude Code gives the classes themselves: device use, file modifying, shell entry, and the flexibility for classes to message each other. Each session has its personal context window, which is the purpose. Isolation is a function, as a result of one session’s confusion doesn’t contaminate one other’s.
2. The session substrate: cmux
cmux manages terminal workspaces and could be pushed from the command line, which makes it scriptable. The coordinator spawns a brand new executing session like this:
cmux workspace create
--name project-session-12
--cwd /path/to/repo
--command 'claude "Read docs/briefs/present.md and do precisely what it says."'
Two issues about that command are load-bearing, and each price actual time to be taught.
--commandsends textual content to the workspace’s shell. It doesn’t begin an agent. You should invoke the agent explicitly. A naked instruction will get typed at a shell that can’t run it, and the launcher nonetheless stories success.- Keep the immediate brief and level at a file. Long command strings fail to execute reliably. A brief immediate pointing at a dedicated transient is extra strong, and it makes the transient reviewable and re-runnable, which a string buried in shell historical past shouldn’t be.
3. The sturdy state retailer: Plan Desk
Plan Desk is a planning board uncovered to brokers over MCP: initiatives, targets, duties with dependency edges, linked design paperwork, and feedback. The coordinator and each executing session learn and write the identical board.
This is the element individuals skip, and skipping it’s why their multi-agent setups don’t survive the evening. The board is the reminiscence. Sessions are disposable, the board shouldn’t be.
What lives on the board:
- Tasks as construct contracts. Problem assertion, motion objects, interfaces, validation contract, non-goals. Detailed sufficient that an executing session by no means must learn a guardian doc to complete the work.
- Status that flips atomically with the work.
in_progressthe second you begin,performedthe second it’s verified. Never batched on the finish of a session, as a result of a board that’s solely true at standdown shouldn’t be a board. - Design paperwork linked to the duties they govern.
- Comments, the place a human leaves course and an agent leaves reasoning.
The working loop
One work merchandise at a time. One dispatch. One commit.
1. PULL the following unblocked process from the board
2. READ its linked design doc earlier than touching something
3. RED GATE run the verifier first: it should fail
4. DELEGATE transient an executing session, or construct it your self
5. PROVE re-run each claimed command; exit codes resolve
6. OBSERVE learn the diff hunk by hunk
7. GATE resolve the approval lane, posting reasoning
8. SHIP flip standing, commit that merchandise alone, report progress
Why the pink gate comes first
If the verify is already inexperienced earlier than you begin, the work proves nothing. You can’t inform an accurate implementation from a verify that by no means runs, a filter that matches nothing, or a check asserting one thing already true.
Running the verifier first additionally catches stale work cheaply. In follow a significant share of queued duties become already performed, constructed beneath a distinct card or made moot by a later change. A pink gate that comes again inexperienced in a single command prices seconds and saves the hour you’d have spent studying code to implement one thing that already exists.
Why one commit per merchandise
Git historical past stays one-to-one with the board. Every commit’s topic names its process. When one thing breaks three days later, the trail from symptom to determination is one git log away.
Verification self-discipline: the guts of the sample
This is the half that distinguishes the methodology from “run a number of brokers without delay.”
A report is proof, not instruction
When an executing session stories “suite inexperienced, 49 checks, zero failures,” the coordinator’s job is to search out out whether or not that’s true. Not as a result of brokers lie, however as a result of the factor they’re reporting on and the factor they checked are sometimes two completely different objects.
One sample value internalizing: a session wrote a commit hash right into a log file by hand, then verified it with git cat-file, in opposition to the brief hash sitting in its shell somewhat than the string it had written. Both checks handed. The file contained a hash that resolved to nothing. The verify and the report have been two completely different objects, and just one was examined.
The rule that falls out: confirm the artifact by studying the worth again out of the artifact, by no means from the variable you suppose you wrote there.
The defect class to observe for
The single most typical failure in agentic engineering is an instrument that stories success for work it didn’t do. It has many shapes.
| Shape | What it seems to be like | How it fools you |
|---|---|---|
| Vacuous assertion | A check that passes whether or not or not the function works | Deleting the factor beneath check leaves it inexperienced |
| Silent no-match | A grep, filter, or predicate that matches nothing | Zero findings reads as “clear” |
| Errored verify | A command that didn’t run in any respect | The error is swallowed, absence reads as proof |
| Wrong reference | A filter keyed on “newer than X” | Anything that occurred in between slips by way of |
| Stale premise | A verify whose anticipated worth was learn off damaged code | It passes the bug it was written to catch |
| Scope mismatch | A inexperienced verify over a subset introduced as the entire | The denominator isn’t said |
The normal protection: each verify that may fail to match should say so. A rely of zero and a failure to run should be distinguishable. And an absence assertion wants a constructive management in the identical run, as a result of if nothing ran, “nothing unhealthy occurred” passes.
Prove a constructive earlier than believing a destructive
Before concluding one thing is absent, show your instrument can discover it when it is current. Point the verify at a known-good case first. A device that stories “clear” and a device that’s damaged produce equivalent output.
Durable channels beat ephemeral ones
Sessions can message one another instantly. That channel is genuinely helpful. It is how a coordinator solutions a query mid-run, and the way an executing session flags a contradiction somewhat than working round it.
But it’s not dependable sufficient to depend upon. A message could be queued behind a busy session, held for approval relying on the receiving session’s permission mode, or expire undelivered. Silence shouldn’t be settlement.
So something that should arrive goes in a sturdy channel.
- Committed information. A short, a handoff doc, a constraint. Sessions learn the repository at startup.
- Board playing cards and feedback, the place work-specific context belongs.
- Share hyperlinks. Most boards can render a process or doc as agent-ready textual content at a URL. Put
Context:in a launch immediate somewhat than pasting the context into it. The immediate stays brief, and the context stays the place it’s maintained.
A message is a nudge. A file is a contract.
Where issues stay
A small self-discipline that pays off: preserve sturdy coverage separate from ephemeral work content material.
Policy directories maintain the contract that governs each cycle, which means the loop, the routing guidelines, and the requirements. Long-lived, reviewed, not often modified. One-off briefs, process context, and session-specific directions belong on the board or in a scratch listing.
Mixing them signifies that in six months no one can inform which information nonetheless govern something.
Timeboxing: surfacing with out stopping
A protracted autonomous run ought to report on a cadence somewhat than disappearing for hours and returning with a wall of diff.
The rule that makes timeboxing work: the interval decides how typically you floor, by no means the place the work stops. When the timer expires mid-item, end the merchandise, confirm it, commit it, then report. Cutting a run mid-task strands work within the state that’s hardest to recuperate, which is half-applied, unverified, and not possible to explain actually.
A checkpoint is a surfacing second, not a permission request. The report goes out and the following merchandise begins in the identical flip. If you catch your self writing “shall I proceed?”, delete it. A human who’s watching will interrupt, and a human who shouldn’t be has simply had their run killed by a query.
Report what’s confirmed, not what was tried. An merchandise with no verification result’s carried, not performed.
Practical mechanics that price time to be taught
These are small, and every one has a failure mode that appears like one thing else.
Verify a spawned session really began. Launchers report {that a} workspace was created, which isn’t the identical as an agent operating. Check for the method, and verify its working listing:
launched_at=$(date +%s)
# ... spawn the session ...
# then settle for solely a course of whose begin time is after $launched_at
Capture the reference timestamp instantly earlier than the launch. A filter keyed on “newer than the final session” will fortunately admit an unrelated session that began in between, and if that one has a distinct working listing, a wholesome launch seems to be damaged.
Session names will not be addresses you’ll be able to guess. Whatever title you gave a workspace is commonly not the title the messaging layer makes use of. Re-list the stay classes earlier than addressing one, and don’t reuse a reputation you learn earlier.
Short identifiers are show prefixes, not keys. Boards generally present a truncated ID. Padding it out right into a full-length identifier produces a well-formed worth that doesn’t exist. Resolve it by looking for a particular label substring as an alternative.
Search for the label, not your paraphrase. A log entry’s title is often the writing session’s framing of what it did, which isn’t the cardboard’s precise label. Searching for the previous finds nothing and reads as “no such card.”
In a shared working tree, by no means use a naked commit. git add adopted by git commit commits the complete index, together with something a concurrent session has staged. Use git commit -- so the commit takes solely what you named.
When to make use of this sample, and when to not
Use it when:
- The work spans extra classes than one context window holds.
- Multiple work streams can proceed in parallel.
- Correctness issues greater than pace, and a improper “performed” is pricey.
- The mission will outlive any single session’s reminiscence.
Do not use it when:
- The process is a single well-scoped change. One session, no ceremony.
- You can’t afford the coordination overhead. The sample spends actual tokens on verification that produces no code.
- There isn’t any sturdy retailer. Without one you aren’t operating this sample, you’re operating a number of classes and hoping.
The overhead is the purpose. You are shopping for the flexibility to belief the consequence.
Getting began
- Stand up a sturdy board. One mission, a handful of targets, duties with dependency edges. Make certain your agent can attain it over an API or MCP.
- Write the contract down. One file that states the loop, what “performed” means, and the requirements. Commit it. Every session reads it at startup.
- Run one coordinator and one executor. Do not begin with six. Get the verification loop sincere with two.
- Add a handoff artifact. A single file the coordinator updates on the finish of each session with the present state and something realized. This is what makes classes compound.
- Keep a classes log. When one thing surprises you, write it the place the following session will learn it, earlier than that session ends.
The measure of whether or not it’s working shouldn’t be how a lot code will get written. It is whether or not, at any second, you’ll be able to ask “what’s the state of this work?” and get a solution that’s true.
Closing thought
The intuition when AI coding brokers underperform on lengthy work is to achieve for a greater mannequin or a much bigger context window. Both assist. Neither addresses the precise constraint, which is that no one is checking. That is similar hole behind the 70% problem, and behind each agent that operates a live system with no read-back step.
A coordinating session that writes no code however is aware of what’s true is value greater than one other executor. That is an outdated lesson from human organizations, and it seems to switch.


