/ writing · agent architecture
Running a fleet of coding agents: what broke, and what it taught me
What changes when you stop chatting with one coding agent and run many in parallel, told through the failures.
December 3, 2026 · by Mohith G
For most of the last year, working with a coding agent meant one terminal, one conversation, one task. You type, it works, you read, you type again. The agent is fast, but you are the scheduler, and you can only hold one thing in your head at a time.
That ceiling breaks the moment you try to run more than two of them. Three agents in three terminals is not three times the output. It is three things to babysit, three contexts that drift, and a growing pile of half-finished branches.
So I built a system that runs a fleet of coding agents, and I run it every day. The shape is simple. What took months was learning what the system must refuse to do. I won’t hand you the rules. I’ll tell you what went wrong, and what it cost me.
The shape is the easy part
Each ticket gets its own agent, with nothing from the other tickets in its head. I decide what runs. The agents do the work.
Context is the scarcest thing an agent has, and mixing tickets in one context is the fastest way to waste it. Two bugs in the same file bleed into each other’s fixes. Isolation is cheaper than discipline.
Anyone could draw that. The drawing is not what took months.
Two answers, one question
Agents in a fleet have to talk to each other, and to me. The first version used plain English. That lasted about a day.
Plain English fails in boring ways. The one I remember best: I answered a question in one place, then gave a different answer somewhere else. Both arrived. The session quietly picked one, and it picked the one I had abandoned. Nothing crashed. I found out by reading the diff.
So the agents stopped chatting.
Done, according to the agent
Agents are eager. Hand one a ticket and it is editing files within a minute. An eager agent will tell you it is done when it isn’t, and it will believe it.
So the system stops them, in more than one place, and it does not ask the agent’s permission to do it. Each stop is there because something got through without it.
The one I think about most: a pull request merged while QA was still running on it. Then the QA run finished, and it had found a bug. Everything had looked green.
A cheap model, confidently wrong
Most calls in a fleet are not hard, and paying top rate for every one of them is waste. Every team that runs agents at volume works that out.
The fix has a quiet failure, not a loud one. I’ve had a cheaper model explain code it hadn’t understood, fluently and with total confidence. Nothing in the answer said it was a guess. A loud failure gets caught. A fluent one gets believed.
Sessions don’t last
Long tasks outgrow the context window, and something has to carry the work across. Once, a fresh session picked up where the last one stopped and reversed a choice that session had made on purpose. Nothing flagged it. It looked like progress.
Machines run out too. Many agents running builds and test suites will exhaust memory. Once, the machine took the one session I could not afford to lose. Surviving all of that is a large part of what I built, and the least visible.
Two sessions, one branch
Two sessions pushing to one branch don’t crash. They overwrite each other’s commits, and both report success.
Nothing failed. Two agents did exactly what they were told, and the work of one of them vanished. In a fleet, “both succeeded” is not the same as “nothing was lost”.
A day of nothing
An agent once sat idle for a full day with every result it was waiting for already on disk. Nothing was broken. Nothing was red. It just waited, politely, and the day was gone.
That can’t happen now.
A person in the loop, not at a desk
Past a handful of agents, “what is everything doing” stops being a question I can answer from memory. Most of what they ask me takes seconds to answer, and an agent can stall for hours waiting for those seconds. So I stopped needing a desk to answer.
What changed for me
The biggest change isn’t speed, though it is faster. It’s what my day is made of. I don’t type into one agent and wait any more. I decide what gets worked on, answer questions as they come in, and read what comes back. Most of my attention now goes to the few decisions only I can make.
The other change is quieter. Every failure in this post looked like success when it happened: a green check, a fluent explanation, two sessions both reporting done, an agent patiently waiting. A fleet doesn’t fail loudly. It fails politely, at scale. You only find out if something in the system refuses to take “it looked fine” for an answer.
The take
The model is no longer the bottleneck in agentic coding. Orchestration is. One agent with a good model is a productive pair programmer. A fleet of them without structure is a distributed system that nobody designed.
The structure that made mine work is mostly old distributed-systems ideas. The ideas are in every textbook. The rules that make them hold for agents are not, and none of mine were designed up front. Each one is the residue of a specific failure.
- human
- agent
- a failure behind it
- 01. One failure behind it: two sessions, one branch
- 02. One failure behind it: one question, answered twice
- 03. One failure behind it: merged while QA was still running
- 04. One failure behind it: a cheap model, confidently wrong
- 05. One failure behind it: a handoff reversed a deliberate decision
- 06. One failure behind it: idle for a day, results on disk
If you are building something similar, expect the same. The model will not be what stops you.
This is a system I built and run every day. The rules that make it hold up came from failures like the ones above, and knowing where they go is the part I bring to a team. If you want your engineering to work like this, see how I think about it, and then let’s talk.
/ more on agent architecture
-
Why agents can't just chat with each other
Free-form chat between AI agent sessions fails in small, compounding ways. Here is what it cost me before I replaced it.
read -
Agent cost control: where the money actually goes
An agent that costs $0.10 per run becomes a $30K monthly bill at meaningful traffic. Here's where the cost concentrates and which controls keep it sustainable.
read -
Observability for agents: what to instrument from day one
An agent without observability is a black box that occasionally produces output. Here's what to instrument, what to alert on, and what to keep out of your dashboards.
read -
Agent latency: where the seconds actually go
An agent that takes 30 seconds to answer is unusable for most product surfaces. Here's where the time actually goes and which optimizations move the needle.
read