I spent months building a fleet of coding agents. The one I kept, my whole team can start
At work, anyone on my team can now type one command with a ticket and walk away. An agent picks it up, researches, plans and builds it. It gets its own test environment to check its work. It flips the feature flags it needs. Then it hands back a branch.
It’s the same loop I ran on my laptop for months. It just isn’t on my laptop anymore.
Getting there mostly meant deleting things.
I got impatient waiting on one coding agent at a time. So I started running several. Each was a claude -p process working one ticket in its own copy of the repo. A small script I called the control tower started them. A local dashboard kept an eye on them all.
Running several at once brought out the real problems. First, every agent needs a place to try its change. Our test environments took 25 minutes to start. That one got its own post.
Second, I kept adding agents. A researcher, a planner, a builder and a reviewer. A verifier to click through the change in a browser. Helpers for GitHub and Jira too. Each fixed a failure I had just watched happen. Each made sense on its own.
Then I moved the whole fleet to the newest model. Next morning, daily spend had jumped to $559.
Per-token price was the wrong number. What mattered was cost per task.
A verifier reads full web pages and database rows. It burns through tokens without needing to think hard about any of them. Putting the expensive model there bought nothing. I put it where thinking pays off. The cheap one went everywhere the work was mostly reading.
The fleet had a sneakier problem. claude -p exits as soon as the model ends its turn. An agent could announce “now running the reviewer” and hand it off in the background. Once its turn ended, the reviewer was quietly killed a few minutes later. The process still exited cleanly. On one ticket I lost five delegated steps that way. That included two verification runs and the final review. Every signal said the run finished fine.
Exit 0 doesn’t mean the plan completed. It just means the process stopped.
So I started measuring in what became my own small lab. I took a ticket that had already merged. I reran it from scratch across different setups. I tried one big model alone, a planner handing off to a builder and a few variations in between. Then I compared each result against what actually shipped. I checked the same behavior on a live environment.
The setup with the most horsepower lost. A planner and a builder ran at maximum effort. They shipped a way around a permission check and a way to lock people out. One agent planning in its own context got the design right. Only one build matched what merged on every live check. It came from a mid-sized model asking a stronger one for advice on the decisions that mattered.
Two other things from those runs stuck with me. First, four small, cheap reads of the plan ran with no tools. Each got one narrow question: what could be reused, what’s the smallest change, where does this belong and how would you break it. Together they cost about $1.40. They found the detail that decided whether the change was correct. The big models working alone missed it. Second, verifiers spent about a third of their time checking for a ready test environment. Now the main agent waits for the environment once before the verifier starts.
So the fleet shrank. Today one Sonnet agent drives a ticket from start to finish. When it hits a real design choice, it asks Opus for advice. It still starts fresh agents, but only when a fresh context is the point. One is an independent review that hasn’t seen the agent’s reasoning. The other is a browser check whose bulky output would crowd out everything else.
That’s the loop I wanted to share. As it happens, our team already had a place for it.
Colleagues of mine run an internal agent platform. It reviews every pull request, explains failed CI runs and takes on tickets. I tried using it on real tickets. Just getting it to start implementing anything took time and effort. It was built around a gated, multi-step flow: plan, wait for approval, then build.
I didn’t ask for changes to that. I copied my personal loop in as a new workflow next to the others. Underneath it’s the same claude -p setup I run at home. Now it runs in a sandbox on the platform instead of on my Mac. One agent, one advisor and no plan gate. You start it on a ticket. It hands back a branch. From a terminal you can watch it, send a message mid-run to steer it or start a follow-up once it’s done. The platform’s run page has a message box that does the same.
Two things made it useful outside my laptop. Both came from my own setup:
- It gets its own test environment. The worker uses the same command-line tool I use. Each ticket gets a private copy of the platform within minutes. Its commits land on it as it works.
- It can test its own flags. Most of our changes ship behind feature flags. So “it works” has to mean it works with the flag on and with it off. The worker can flip a flag for its own environment and nobody else’s. That turned into a small story of its own.
The first days were humbling. I think that’s what first days are for. Eleven tickets went through it in two days. A small front-end one took about 45 minutes from start to branch. On day one, every worker’s test environment returned a server error at login. I found the cause and restarted two services by hand. The workers didn’t have the token for flags yet. So I flipped those for them. The design-tool login turned out to be on a seat that allows 20 design lookups a month. The first run used about 5.
One worker read its ticket, disagreed with the suggested fix and built something else. Its reasoning was sound. I only found out from reading the code. Now a worker has to put any disagreement with its ticket at the top of the pull request.
The agent writing a branch was never the hard part. Everything around it was.
I’m still the gate. The worker pushes a branch. A pull request opens in my name and gets reviewed. I’m the one who marks it ready and merges it. Agents do almost everything up to that point. I’d rather keep it that way for a while.
My laptop is a lot quieter now. The long-running loops are all retired. A small script with no model checks GitHub, Jira and the running workers every 10 minutes. It only starts a short agent run to deal with it when something actually changed. How that part works, and what feeds it, is another post.
If you’re building your own setup, here’s what I’d do differently from the start:
- Measure before you add an agent. Rerun a ticket you already shipped and compare it against what merged. Each of my extra agents fixed something I had seen once. Together they made things worse.
- Pay for thinking, not for reading. Put the expensive model where the decisions are. Put the cheap one where the work is mostly reading.
- Don’t trust a clean exit. Check that every step you planned actually ran.
- Give it the same tools you use. The worker got good at its job the day it got my test environments and my flag access, not the day it got a better prompt.
The best thing about the setup now isn’t that it runs on its own. It’s that it isn’t mine anymore.