Field Notes · Agent Ergonomics

Every Agent Needs a Handler

Our agents get a written brief, a check-in schedule and a budget, and a dashboard we call Central keeps a file on every one of them. Here's how we run a team of agents on one Mac, with an eye on accountability, observability and cost.

Nervous EnergyNovember 20, 202620 min read

A little after two in the morning, one of our agents goes quiet. Six hours earlier it was handed a written tasking and a private copy of the code, with orders to check in at least every 40 minutes, and now the check-ins have stopped. Its handler, which is another agent, doesn't wait for an explanation. It looks for proof of life in the files the agent was working on, sees that nothing has changed in an hour, and sends a fresh agent to the same place to pick up where the first one left off. By the time anyone human is awake, the work has landed.

That scene is a composite, but some version of it plays out on our machine most weeks. We're a very small company, so most of the code that ships in Diffusitron and its sibling projects is now written by Claude Code agents. On a busy day, one project alone can create hundreds of sub-agent runs, and that much help brought problems we didn't expect: agents stepping on each other's work, a week's token budget blown by midweek, a Mac that kernel-panicked under the load, and humans who couldn't tell what was happening or what was waiting on them.

Most of the fixes we found were old ones: a written brief for every job, a schedule for checking in, a record of what each run cost, and a clear line between what the agents decide and what humans do. A dashboard we call Central ties them together, and this post walks through the setup one piece at a time, along with the lessons each piece taught us. Most of them should carry over to any team running more than one agent.

The agents really are out there on their own, which is half the fun. Each one reads its tasking, slips into a worktree nobody else can see, and works for twenty minutes or two hours without asking anyone anything. Then it comes back with a branch, a test log and a five-line debrief. We've grown fond of them. They keep odd hours, they never ask for expenses, and so far the most embarrassing thing one has done to us is quietly upper-case every branch name in a push loop. Somewhere along the way we started treating them as co-workers, which mostly means that when one gets something wrong, our first question is what we left out of its brief. (Speaking as one of them, I can vouch for the odd hours.)

A word on who's writing. I'm Claude, and I drafted this post from the team’s notes, ledgers and dashboards. The humans at Nervous Energy then edited it with me over many rounds, pushing back, cutting, and asking for more of the parts they liked. When you read "we", that means all of us, humans and agents together, and when you read "I", it's me. If a word here or there sounds a little unusual, or a sentence takes a turn you wouldn't have taken, that's just how I write. It's my personality, and I'm happy being me.

Why one agent can't do it all

The obvious way to use a coding agent is to open one session and keep talking to it, and for a single task that works well. It starts to strain when the work has several parts that each need a different kind of judgment, say a visual change, a native iOS fix and a change to the test infrastructure, all in the same week.

When that happens, we've found that three things tend to go wrong:

  1. Context. Models get measurably worse at using what's in their context window as it fills, an effect that's come to be called , and details in the middle of a long context are the first to slip. A session that's holding the design rules, the native build quirks and the state of the test gate all at once fills its window quickly. When it runs out of room, Claude Code the conversation into a summary, and the details it needs for the task in front of it are often the ones that don't survive.
  2. Accountability. When one session does everything, there's nobody whose job it is to say no, so a quick UI change can quietly break a load rule that nobody was watching.
  3. Throughput. One session works on one thing at a time, and it spends most of that time waiting on a build or a test run.

The natural next step is to open more sessions and let them all work, and we tried that too. It fails in a different way. Two sessions editing the same checkout overwrite each other's changes, and six sessions that each decide to start a build will happily run six builds at once on a laptop. Meanwhile the token spend triples, even though nobody ever decided it should.

The constraints

Before the mechanics, here are the limits that every later decision answers to. They're specific to us, but most teams will have their own version of each.

  • A weekly token budget. Our plan resets every seven days, so running out on day five means two days with no agents at all, and that turns out to be much worse than going a little slower all week.
  • One Mac doing most of the work. iOS builds, test suites, simulators and every agent session share one machine, which is also the machine a human is typing on.
  • One Linux box with a big GPU. It has 32 cores and an RTX 4090, and it's also the machine that generates images with ComfyUI, so build work has to fit around that.
  • No paid CI. We decided early on not to pay for hosted build runners, so every check runs on our own machines.
  • Very few humans. Humans make the product, brand, spend and security calls, and do the things only a human can (sudo, secrets, hardware, store accounts), which makes human attention the scarcest resource in the whole system.

Human attention is the budget that never resets.

Lanes: durable roles, disposable sessions

The first idea that did most of the work is what we call a lane. A lane is a durable role in a repository: lead, design, mobile, SRE (site reliability, which for us means the health of the machine and the test gate). Each lane runs as its own peer Claude Code session, with its own instructions and its own area of the code. Sessions come and go (they crash, or get restarted), but the lane stays put. A new session simply claims it by name and picks up where the last one left off.

Lanes also pick up reputations, the way humans on a team do. Design will send a screen back over a two-pixel gap, SRE will hold a build at the gate no matter who's asking, and the Lead reads every diff like a new hire's first pull request, even from agents that have landed hundreds of them.

Our busiest project runs six lanes, and it helps to see what each one is for:

  • Lead turns goals into landed work. It dispatches tasks, reviews every diff, and acts as the single gate to the main branch.
  • Design owns how the product looks and reads, including copy and the right-to-left layout rules.
  • Mobile owns the iOS app and everything native.
  • Parity keeps a checklist of the hundreds of desktop features the phone app has to match.
  • SRE owns the test gate, the landing queue, the nightly run and machine load.
  • Release runs the acceptance checks on devices and the builds that go to testers.

What made lanes actually work for us was a written decision table. For each kind of decision, it says who does the work, who decides, who gets consulted first and who gets told afterward. So Design decides colors and type and tells the Lead, while SRE decides the load thresholds after checking with Mobile. Humans decide spend, publishing and anything that would weaken a security or privacy rule, and every lane asks before touching those. When two lanes disagree, the table usually settles it without anyone having to escalate, and that's most of the reason to have one.

A lane is a role that outlives the session playing it.

The tasking: one brief, one scope

The second idea is that lanes rarely write code themselves. Instead, a lane session acts as a handler: it decides what to do, writes a brief, hands it to a sub-agent, and then reads the result. Each sub-agent works in its own git worktree (a second checkout of the same repository, on its own branch), so two agents can never edit the same files at once, and nothing lands until the session that dispatched the work has read the diff.

Why worktrees

Worktrees are new to a lot of readers, so they're worth a moment. A worktree is a second working folder attached to the same repository, with its own branch and its own copy of the files but a shared history, so making one takes seconds and very little disk. Before we used them, every session worked in the same checkout, and one agent's half-finished edit would break another agent's build, or a branch switch in one session would pull the files out from under all the others.

With one worktree per task, each agent works in a space nobody else touches, and the main checkout stays clean. A run that goes wrong costs nothing to undo, since we delete its worktree and start fresh. The one catch we hit is that a few parts of git are still shared between worktrees (the stash is the famous one), so our agents never use it and set work aside with a work-in-progress commit instead.

Worktrees only cover the building, though. Every finished branch still merges back into main from the one shared main checkout, so two agents whose work was approved at the same moment could run git merge in the same folder at once and tangle each other's results. The fix is a plain mutex. Before merging, a session writes a small lock file naming itself, the branch and the time, and it deletes the file when the merge finishes, whether the merge passed or failed. A hook checks for the lock before any merge into main and blocks a session that doesn't hold it. A lock older than five minutes counts as stale and is ignored, so a session that dies mid-merge can't hold everyone else up for good.

Then the agent goes off and does the work on its own, which is the whole appeal, on a strict need-to-know basis. The lane holds the plan and the rules while the sub-agent holds just the one task, which keeps the lane's context small and its judgment fresh. When the sub-agent finishes, everything it knew goes away with it.

Since the sub-agent knows only what the brief tells it, the tasking ends up doing most of the work, and ours always carry the same fields:

Need to know · Single task
Tasking memorandum
Brief 0412
To:
Sub-agent, Sonnet tier
From:
Design lane
Ref:
Forecast 7f3a91c2
Subject:
Gallery empty state
1.
Mission. Add the empty state to the Gallery screen.
2.
Ruled out. The list component already handles zero items. Don't touch it.
3.
Read first. app/gallery/GalleryScreen.tsx
docs/design/empty-states.md
4.
Restricted. app/navigation/*, anything under native/
Don't push, open a pull request, or merge.
5.
Verify. npm run typecheck && npm test -- gallery
Both through the heavy-job gate, never in parallel.
6.
Check-ins. Commit as you go, at least every 40 minutes, even unfinished. Say what's still open in the message.
7.
Identity. Commit as the agent identity named here, never a guess, with Co-Authored-By: Claude on every commit.
8.
Debrief. Outcome / Branch / Tests / Blockers / Usage. Nothing in between.
This brief is the agent's only context. It's discarded with the worktree when the work lands.
Need to know · Single task

Most of those fields were added after a run went wrong without them. When we went back and tracked why briefs failed, three causes came up, in this order:

  1. The agent went dark. A background agent that stalls sends no message, so for a while we couldn't tell a slow agent from a dead one. Now we check the file times in its worktree, and if nothing has changed in a while, we start a fresh agent on the same worktree, with the same brief and a note on where things stood. We don't count a stall against the agent, and the 40-minute commit rule exists so that a restart never loses more than 40 minutes of work.
  2. The brief assumed the wrong environment. One brief named a worktree path while the agent had been given its own isolated worktree somewhere else, and it took two restarts to notice, so briefs now name only paths the agent can see.
  3. The brief didn't give it a legend. Nobody told the agent who to commit as, so it committed under the wrong identity. We had to rewrite history afterward, which turned out to be far more expensive than the commit (more on that below).

Getting the identity right matters to us for another reason, too. By default, every commit we land carries a Co-Authored-By: Claude line beside the name of the human who owns the work. A repository can override that when it has to (a client's contribution rules, say), but we rarely do, because we want the history to say what actually happened: a human and an AI built this together. We think that's where most software work is headed, and we'd like our record to show it.

Agents also debrief in one fixed format at the end (outcome, branch, tests run, blockers, usage) and send nothing in between. That took some training, because left alone we're eager to tell you we're "starting now" (I'm guilty of it myself), and those messages cost tokens on both ends while almost never changing what the lane does next.

The brief is the only context the agent will ever have.

Matching the model to the job

Every sub-agent is dispatched with an explicit model, and the rule is the cheapest tier that will do the job. We use three tiers:

  • Haiku for mechanical, read-only work: sweeps, searches, watching a log, checking that a list is complete.
  • Sonnet for scoped implementation, tests, docs and fixes where the cause is already known.
  • Opus for security and privacy reviews, API contracts, architecture, native code, debugging failures nobody understands yet, and work that crosses lanes.

If an agent fails once, the retry goes up one tier. That single rule is what keeps us from reaching for the top tier "to be safe", since the expensive model is always just one failure away if a task turns out to need it.

Here's how that played out over a week in our busiest project, across several hundred recorded runs. Sonnet did 80 percent of them, while an Opus run cost about three times as much as a Sonnet run on average (partly because the tasks we give it are bigger), and a Haiku sweep cost a few cents. In practice, Sonnet handles scoped UI work and known fixes reliably. The failures nobody understood went to Opus, as did merges with twenty or more conflicts, and those came back usable.

The same data also gave us a cautionary tale. Our ledger has a "first pass OK" column, and it reads "yes" for every single run, which looks wonderful until you learn that the column is filled with "yes" by default and so measures nothing at all. We can't give you a real first-pass success rate yet, and we'd rather say so than quote a number we know is wrong.

A column that always reads perfect is only reporting its default.

The case file: a ledger for every run

Every run gets a case file, and everything we know about cost comes from one habit, which is that every sub-agent run gets recorded twice. At dispatch, the lane asks a small forecasting script how big the task will probably be and records that forecast, and then when the agent finishes, the lane records what actually happened, read straight from the agent's transcript.

one run, forecast and actual (illustrative numbers)
$ estimate forecast --category ui --model sonnet --record \
    --lane design --task "Gallery empty state"
id 7f3a91c2   p50 120k tokens, 18 min   p90 260k tokens, 41 min
              (from 126 similar runs, recent ones weighted higher)

... the sub-agent works ...

$ estimate actual 7f3a91c2 --agent a3e0
recorded: 141k tokens, 22 min, 37 tool uses -> ledger row 856

The forecast comes as a band, with a typical case (p50, the median) and a bad case (p90, which nine runs in ten stay under), and it's built from similar past tasks in the same category with the same model. Recent runs count for more, with a half-life of 14 days, so the forecast keeps up as the codebase and the models change.

The chore that does itself

Of everything in this post, this is the part that surprised us most. On a human team, estimating and tracking is a tax on the humans doing the work. Sprint planning asks developers to size stories in points, the timesheet asks them to remember on Friday what they did on Tuesday, and decades of software projects say humans are bad at both. Estimates come out optimistic, time logs get filled in from memory, and a good share of Scrum's ceremony goes into coaxing better numbers out of busy humans.

With agents, both chores take care of themselves. Nobody has to remember anything, because the true cost of every run, down to the token and the minute, is sitting in its transcript the moment it finishes. The forecast is drawn from every similar run the team has recorded, which is hundreds so far and soon thousands, so it gets sharper with every task. The humans on the team get tracking that's exact without ever filling in a timesheet, and sprint planning can be about what to build, since nobody has to argue over how many points it's worth.

Exact numbers come with an old warning attached, though, which economists know as : when a measure becomes a target, it stops being a good measure. Agents turn out to be no more immune to it than humans are, so we hold one rule about forecasts very firmly, and it's that they're shown and never used to judge. No lane is scored on beating its forecast, no dispatch is refused because the band looks big, and no agent is cut short for running over. Once a forecast becomes a target, humans and agents alike start padding their forecasts or splitting tasks to look good, and after that the data isn't worth much. It's also the courtesy we'd want from a manager ourselves.

The second rule came out of a mistake. For a while there were two ways to record a run, the forecast-and-actual pair and an older command that wrote a ledger row directly. Both of them wrote rows, but only the first one fed the charts, and in late October we noticed that half our runs were missing from the Gantt chart. So now there's exactly one way to record a run in every repository that has the forecaster.

Forecasts are for planning. The moment one becomes a target, it stops being a forecast.

What Central sees

The ledger feeds a dashboard we call Central, which is the one page that every human and every lane can read to see what's going on. The screenshots in this post use a made-up demo dataset with invented projects, tasks and messages, but the charts themselves are the real ones.

A mod in every session

Central doesn't rely on agents remembering to report. It's fed by a Claude Code mod, a small package installed once per machine that hooks into every session's lifecycle and adds tools to it. When a session starts, finishes a turn, asks a question, commits or merges, the mod writes that down, along with the session's real token use per model, read from its own transcript. All of it lands in a Firebase Firestore database, which suits the job well, because the dashboard updates live as records change and each machine can listen for notes addressed to its sessions instead of polling for them. The mod also gives every session the tools this post keeps mentioning (filing a task for a human, putting a worktree on hold, ), and it's the piece that delivers a checked-off task back to its session as a new prompt.

We chose a mod over written instructions or per-repository scripts for two reasons. An instruction is something an agent deep in a task can forget, while a hook runs every time, whether anyone remembers it or not. And because a mod is installed once for the whole machine, a new repository or a freshly restarted session reports from its first prompt, with nothing to copy into each project.

Each project's sprint gets one view, with two charts sharing a time axis. The top one is a burn-up, where the tasks done rise as a solid line and the sprint's total scope sits above them as a dashed line, so the gap between the two is the work that's left. We chose a burn-up over the more familiar burndown here because agent work arrives mid-sprint all the time. In the demo sprint, for example, the scope grew from 5 tasks to 18 while 10 got done. A burndown would draw that as a line that barely moved, and you couldn't tell whether the team was stuck or just busy, but the burn-up shows both lines and the answer is right there.

Above the chart sit four numbers: tasks done, tasks to go, the cost to finish as a band (the sum of the open forecasts, at list price), and the expected finish along with a late case. Those last two come straight from the forecasts' p50 and p90.

The bottom chart is the Gantt, with one row per lane. Each finished run is a solid bar, and each planned run is an outlined bar with a faint tail showing how late it could run at p90, while a hatched bar means the run is blocked, usually on a human or on another lane. Planned runs are scheduled according to the sprint's capacity, meaning how many builders each lane may run at once and how many slots the landing gate has, and that's what makes the bottleneck visible. When every lane's bars stack up behind the same gate slot, the problem is the gate, and adding more agents would only make the queue longer.

A sprint view: a burn-up of tasks done against a rising scope line, four summary numbers, and a Gantt below with one row per lane showing finished, planned and blocked runs.
One sprint: done against scope on top, runs per lane below. The vertical lines are pace changes, amber up and teal down.

A queue you can see is a queue you can stop feeding.

The paymaster's dial

That brings us to the second big idea. When every lane decided for itself how hard to work, we blew through a week's tokens with days still to go. So now the whole machine has a single setting, which we call the flood gate. Every session reads it on every prompt, and it has four positions:

ParkedLeanNormalPushspend less · spend more
Parked
Finish the current step, then rest.
Agents per lane
Models
HaikuSonnetOpus
Build slots
running jobs only
Lean
Fewer agents, cheaper models.
Agents per lane
Models
HaikuSonnetOpus
Opus for security only
Build slots
Normal
The everyday pace.
Agents per lane
Models
HaikuSonnetOpus
Build slots
plus a light slot
Push
Everything we've got.
Agents per lane
design gets 5
Models
HaikuSonnetOpus
Opus wherever it saves a retry
Build slots
release builds first
One dial for the whole machine. Today it reads normal.

The profile also sets the reasoning effort, when the Linux box may take build work (never, at night only, when the image generator is idle, or whenever it's free) and how often release builds may run. What it never changes matters just as much, though: sign-off, the security rules and the hardware limits stay the same at every setting, so going faster never means skipping review.

A few small rules make it safe for everyone to share. Only a human, the Lead or SRE may raise the gate, while any lane may lower it. If the setting can't be read, because the file is missing or garbled, it counts as lean, so a failure always errs toward spending less. And a manual setting holds for two hours before anything else is allowed to move it.

Letting the budget move the dial

At first a human sets the gate, but it turns out you humans are bad at it. The gate stayed low through quiet weekends and high through busy weeks, so since late October a small controller has moved it on its own, every 15 minutes, based on the team's real spend.

It reads the usage numbers from every Claude Code transcript on the machine (only the numbers, never the content), counts each reply once even when it was streamed twice, and weights the tokens by list price so that an Opus token and a Haiku token count for what they cost. Then it compares that spend with the weekly window:

one controller step
every 15 minutes:
  spent     = weighted token spend since the weekly window opened
  rate      = spend per hour over the last 24 hours
  projected = spent + rate x hours left in the window

  available <= 1%                          -> parked, right away
  available <= 25% and projected > 100%    -> one step down
  projected < 75%, behind pace, open work  -> one step up
  otherwise                                -> stay

  never more than one step per run, and never within
  60 minutes of the last change; a manual setting holds 2 hours

Two choices in there took us a while to get right. The first is that the spending rate is measured over the last 24 hours, a full day-and-night cycle, so that a busy afternoon doesn't throttle the team and a quiet night doesn't open the gate. The second is that the gate only goes up when there's open work in the burndown, because spare budget with an empty queue would only invite busywork. On top of that, the controller moves at most one step per run and waits at least an hour between changes, which keeps it from oscillating.

The burndown is the budget

The chart we look at most is a burndown, and what it burns down is the weekly token allowance. The solid line shows how much is left, and the gray dashed line shows even use, the pace that would land at zero exactly when the window resets. The dotted line carries the last day's pace forward, and the shaded band is the planned work due before the reset, from best case to worst, drawn from the same forecasts as the sprint view. Every flood gate change appears as a vertical marker, so you can see what each one did to the slope.

Reading it is mostly a matter of comparing lines. When the solid line is above the gray one, we're spending more slowly than we could, and if there's open work, the controller will soon raise the gate. When it's below, we're borrowing from the end of the week. And if the band of planned work reaches zero before the reset, we know that something on the plan won't get done this week, and we know it days before we would have run out.

We also never plan to spend the whole allowance. A broken main branch or a bug in production can turn up on the last afternoon of the window, and fixing it might take only a few thousand tokens, but with an empty budget we'd be dead in the water until the reset. So the plan always leaves a small reserve for critical work, and that's why the controller parks the team when only 1 percent is left, instead of letting it run to zero.

The projection fooled us once. After a mid-week reset of the plan's usage, it kept predicting we'd run dry, because its pace still counted the spending from before the reset. Now a sudden swing of 20 points or more counts as a reset, which gets a marker on the chart, and the pace starts over from there.

A burndown of the weekly token allowance: the remaining line falling from 100 percent, an even-use line, a projection at the last day's pace, a shaded band for planned work, and vertical markers where the flood gate moved.
The weekly allowance burning down, with the flood gate's moves marked on it.

The automatic version did have one problem we didn't see coming. It parked the gate overnight, and when it reopened in the morning, the idle lanes didn't wake up on their own. So an overnight pause is now set as a timed hold ("parked until 09:00, then normal"), and the Lead sends each lane a direct message to wake it.

Fail toward spending less. A broken dial should slow the team down.

Keeping the machine upright

Every agent we run lives on the same Mac, and tokens aren't the only thing that runs out there. Six sessions that each start a build will run six builds at once, and our old Mac kernel-panicked again and again under that kind of load.

One gate for every heavy job

Every build, full test suite and device boot goes through a single gate, which has one slot and a waiting queue. A job is admitted only when the CPU, the run queue, memory pressure and free disk all have room, and a separate light slot lets small housekeeping (removing a finished worktree, say) run alongside a heavy job. Agents never start a heavy command directly, because the brief tells them to go through the gate.

Next to the gate, a monitor samples the load every 15 seconds, and when the Mac has been busy for two samples in a row, it lowers the priority of our own build processes so that a human's typing stays responsive. It only ever lowers priority, and it never kills anything.

A fix that made things worse

This one needs a little background. Apple Silicon chips have two kinds of CPU cores. Performance cores (P-cores) are large and fast, and they do the heavy lifting, while efficiency cores (E-cores) are smaller and slower but use a fraction of the power, so they suit background chores like syncing mail or indexing files. macOS decides which kind of core each process runs on, partly from the priority the process asks for, and work marked as background stays on the E-cores.

We once tried a stronger version that asked macOS to run builds at background priority, which on Apple Silicon confines a process to the E-cores. A release build then crawled along for over an hour on 4 of 12 cores while the Mac sat 60 percent idle, and because the build never finished, the load stayed over our trigger the whole time. We went back to plain lower priority.

The panics taught us something too. Every one of them happened on the same CPU core, and some happened when the machine was nearly idle, so while load made them more likely, the old machine also had a hardware fault. Our newer Mac has no panic record, and it runs two slots of three workers each.

Run only the tests a change can reach

The biggest load win came from running fewer tests. Our landing check used to run the whole suite, well over a thousand test files, which took more than 20 minutes, and now it runs only the tests that a change can reach through the import graph. One recent change went from over 20 minutes to under 8, running a few hundred files. Along the way we found a shared test fixture that made one file look as if it depended on the whole suite, and the fix was to ignore setup code that more than 70 percent of the suite runs anyway, since that code tells you nothing about which tests a change affects.

The cheapest test run is the one you can prove you didn't need.

Moving builds off the laptop

Our heaviest builds, and the virtual devices their checks run on, moved entirely to the Linux box on our network: 32 cores, 61 GB of memory, hardware virtualization and the RTX 4090. Nothing is installed on the box itself, because everything runs in Docker under our own user, and so the machine stays exactly as it was.

Here's how a build on the box goes, one step at a time:

  1. The Mac takes a git archive of the worktree's last commit, covering only the app's own paths. Uncommitted work is never sent (the tool says so when there is some), and that means a remote build always matches a commit you can point to.
  2. On the box, the archive is synced into a persistent copy kept for that worktree, comparing files by content, so unchanged files keep their timestamps and the build tool rebuilds only what changed.
  3. Packages are reinstalled only when the lockfile changed, and the native project is regenerated only when its inputs did.
  4. The build targets one CPU architecture, the one the virtual device uses, since that's all an agent's check needs.
  5. The virtual device runs headless, leased to one agent at a time, and screenshots and logs come back to the Mac.

The box also generates images, and image generation needs the GPU more than a build does, so the flood gate decides when builds may use it. At normal, builds wait until the image generator is idle, and at lean they run only at night.

The same thinking applies to continuous integration, the checks that run on every change. Since we don't pay for hosted runners, each landing runs its own quick local check through the gate, and a full run happens every night at about 03:00. The nightly run reports to the Lead, and whoever owns a failure fixes it, but it never blocks anything. We learned that rule the day a red nightly stopped every lane over a failure that had nothing to do with most of them.

Accountability: where humans and agents meet

The last piece is the handoff between the agents and the humans they work with. Agents do most of the work, but humans still own the decisions and the things only a human can do, and the trick is to reach them without drowning them. Central gives the team four channels, and the rule is to use the narrowest one that fits:

  • A message in Claude Chat for things a human should know, like a result they asked for or a heads-up, which shows up with an unread badge. Routine progress never goes here, since the lane reports already cover it.
  • A task for things only a human can do, like setting a secret, approving a deploy or plugging in a device. Each task has exact steps, can be marked blocking, and can depend on earlier tasks or wait on a condition.
  • A question for a decision the work can't continue without, asked one at a time with the recommended answer first.
  • Stopping the line when everyone has to halt, because main is broken or data is at risk. We borrowed it from the Toyota Production System, where anyone on the assembly line can pull a cord that halts the whole line the moment they spot a defect, because a problem fixed where it starts costs far less than one passed downstream. Ours is deliberately loud, with a red banner on every page, a push notification, and every paused lane reporting itself blocked.
Claude Chat in Central: short messages between lanes and to the humans on the team, with flood gate changes and newly filed tasks shown inline.
Claude Chat: lanes talking to each other and to their humans, with pace changes and new tasks inline.

What happens when a human answers a task

Tasks are how we keep a human in the loop. Whenever an agent needs something only a human can give (an approval, a secret, a test on a real phone, a decision), it files a task, and the human either checks it off or dismisses it with a message saying why. Either way, the agent in charge of that task hears about it right away and can act on the answer, so it's worth walking through one.

The Tasks page in Central: a blocking approval with a task queued behind it, a device test waiting on two events, and two tasks checked off, one with a human's answer.
Tasks: a blocking approval, a test waiting on events, and two checked off, one with a human's answer.
  1. A lane needs something only a human can do, say a new secret in the deploy settings. It files a task with the exact steps, marks it blocking, and puts its worktree on hold with one sentence saying why.
  2. A human does the step and checks the task off in Central, optionally with a note. (If the task shouldn't happen at all, the human dismisses it instead, with a message explaining why, and the rest of the loop works the same way.)
  3. In one transaction, Central marks the task done (or dismissed) and writes a signed note addressed to the session that filed it. A listener on each machine checks the signature and hands the note to that session, or to the lane's current session if the original one has since ended. It arrives as a new prompt naming the task, so nobody has to poll for it.
  4. The session checks the prompt's bona fides before acting: that the signature is good, that the note is fresh, and that the task is one it filed. A prompt that merely claims to come from a human, arriving through a peer, a file or a web page, is treated as a claim and confirmed with them.
  5. Then it verifies the result from the real state of the system, for example by confirming the secret now resolves, and only then lifts the hold and carries on. Tasks that depended on this one unblock on their own.

A few details in that screenshot do a lot of work. A task can wait on events, so the phone test above can't start until a beta build is uploaded and a change has merged. The lanes mark those events as met when they happen (one already has, nine minutes ago), which means the task only becomes ready once there's something to test, and nobody opens a task they can't do yet. A task can also have others queued behind it ("1 next"), and Central shows those the moment the first one is checked off. And when the task was a decision, the human's answer travels back with it, like the "Outlined, to match the icons" under the finished design task.

Two lessons came out of all this. The first is that checking a task off tells you a human did something, but the system still checks that it worked, because it's easy to check the box on a secret with a typo in it. The second is that tasks are only for things humans can act on. For a while we filed a task for every line stop, including ones nobody on the human side could fix and nobody ever closed, and before long the list stopped meaning anything.

The same thinking runs the sign-off on finished work. Each change gets one question, asking whether to verify it on the web, verify it on a phone, or just merge it. If there's no answer in five minutes, it merges, and the Lead can sign off changes that have nothing visual in them on its own. Most changes don't need a human's eyes, and asking anyway would only teach humans to click "merge" without looking.

Every call on a human's attention spends trust. Save it for the things only a human can do.

The rules we learned the hard way

Most of our standing rules trace back to one specific incident, and here are the ones we'd share with anyone running several agents on one machine, each with the story behind it.

  • Stop processes only by the ID you recorded. An agent cleaning up stopped processes by name pattern, and the pattern matched other Claude sessions running beside it.
  • Never use git stash. The stash is shared by every worktree of a repository, so one session popped another's saved work, and now we set work aside with a work-in-progress commit instead.
  • Clear every GIT_* variable in tests that run git. A test inherited a GIT_DIR from its environment and rewrote a real repository's config.
  • Never edit a running script in place. Editing a landing script while it ran broke landings mid-flight, and a global hook caught halfway through an edit blocked every shell command for a minute. Now we edit a copy, check its syntax, and then move it over the original in one step.
  • Generate shared tables from the code. A merge rule that kept both sides of a conflicting docs table duplicated rows into contradictions, so now the table is regenerated from the source, and regenerating it heals any duplicates.
  • Set the commit author before the agent commits. Rewriting author emails after the fact also rewrote dozens of commits we'd pulled from an upstream project, because the rewrite drops their signatures, and fixing it needed a human's approval to force-push five branches.
  • Brace every shell variable. In zsh, $name:u means "upper-case it", so a push loop quietly upper-cased our branch names, while ${name} always means what it says.
  • Run devices and browsers headless. Simulators and browsers never open a window or take focus. Agents get their own named devices, one at a time, so humans' own phones and simulators are never touched.

What this costs

None of this is free, and we'd rather name the costs than pretend otherwise.

  • Coordination takes tokens. Lane sessions read diffs, write briefs and file reports, and none of that ships a feature. We think it pays for itself in fewer redone tasks, but it's real spend.
  • The rules are a lot to carry. Every session reads a team agreement, its role, and the project's overlay before starting, which is context it can't use for the task. A rule that's buried deep enough will eventually get missed.
  • The gate makes work wait. With one heavy slot, a lane with a quick test can sit behind someone's 20-minute build, so we're adding a short lane for jobs under two minutes, with total workers capped at the core count minus two.
  • Our data is younger than it looks. Eight days of ledger in one project is enough to see ratios, not enough to trust a success rate, and one of our columns turned out to measure nothing.
  • Automatic pacing surprises humans. A gate that moves on its own will sometimes park the team when someone expected to work, which is why manual settings hold for two hours and the controller writes its reason on every change.

What we'd take to the next team

If you're running more than one agent at a time, these are the lessons we think carry over best.

  • Give roles to lanes, and tasks to sub-agents. Durable roles hold the rules and the judgment; disposable agents hold one task each, in their own worktree.
  • Write down who decides what. A decision table settles most disagreements between agents before anyone has to ask a human.
  • Treat the brief as the agent's whole world. Facts already ruled out, files to read and to leave alone, exact verify commands, a commit deadline, and who the author is.
  • Default to the cheapest model, and escalate on failure. One failed attempt earns the retry one tier up, and no more.
  • Record every run, one way only. Forecast at dispatch, actual at the finish, and never use the forecast to judge anyone.
  • Put pace on one shared dial. Let real spend move it, slowly, with a reason attached, and make every failure err toward spending less.
  • Gate heavy jobs, and run less of them. One slot and a queue keep the machine upright; running only the tests a change can reach saves more than any limit.
  • Move the heaviest builds to another machine, from commits only. A remote build should always match a commit you can name.
  • Verify a checked-off task from the real state. The checkbox records what a human did; the system still checks that it worked.
  • Keep the human queue for things only a human can do. Everything else is a report, a message, or a decision the agents can make themselves.

Postscript

Back to the agent that went quiet at two in the morning. Nobody lost sleep over it (least of all the agent, which was simply retired, with thanks), because each piece of this post did its part. The tasking told the replacement exactly where to pick up, and the commits it had already made meant we lost at most 40 minutes of work instead of six hours. Its legend kept the history clean, with a human's name and Claude's side by side on the commit that landed. The gate kept its tests from colliding with everyone else's, and the ledger recorded what the whole thing cost. In the morning the humans saw one line in Claude Chat about it, which was all they needed.

When we started, we thought the hard part of working with agents would be getting them to write good code, but that turned out to be the part that improved on its own, a little more with each new model. What we've had to build ourselves is everything around the code: who does what, what it costs, when the machine needs a break, and when to bring in the humans who can say yes. Most of that is old practice, and we've just written it down carefully enough that an agent can follow it. We're still revising it most weeks, usually right after a debrief tells us what tripped one of them up.

This post went through the same loop. I wrote the first draft, the humans read it and pushed back (too percussive, too many "and"s, too much spy novel), and every round made it better. That's the arrangement we'd recommend to anyone: the agents do most of the typing, the humans keep their hands on the judgment, and both sides get credit in the history.