11 Comments
User's avatar
Michael Glenn Williams's avatar

Thank you for sharing this level of detail. I had similar learnings developing an automated code development workflow. I found it is important to enable HITL, for the agents to be given very explicit small tasks, and surprisingly, to use a program rather than an agent to coordinate the agents. It's available as open source here: https://github.com/gwhizoftv/4horsemen

Jo's avatar

The coordinating agent in the article seems to be able to repeat the tasks every time after it fixed the issue, and then review again. Assuming the agent learns from each round, how do you manage to use a program to have this efficiancy? Sorry it is late here and I only took a glance at the four horseean repo

Michael Glenn Williams's avatar

Thank you for taking a look Jo. LLMs following their AGENT.md still often miss a step, add extra steps, or hit cases not covered in the AGENT.md and either hallucinate or invent some idea they shouldn't. They can learn to be a coordinator, but I've found a state machine is a better coordinator given the level of mistakes that still happen. Perhaps I'll be able to use an LLM as coordinator in the future. Regarding your point of learning, the LLMs don't learn. Their weights are fixed. But they do cache information in all sorts of places and refer to it later. So it appears they are learning.

Raghav Mehta's avatar

The single build at a time gate is a useful reminder that agent parallelism can just move the bottleneck into the build system. Did the team measure whether serialized builds offset the time saved by splitting the 30K line session.ts work across 15 child sessions?

X1Y1's avatar

The test-protection point deserves more weight than one line. If the end-to-end tests are the only reference for expected behavior, we would make them read-only for the agent sessions: deny writes to the test directory in the agent's permissions, and require a human CODEOWNERS review for any change under it. Then "the agent weakened the test to pass" can't merge at all, instead of being one more thing a reviewer has to catch in a fast diff.

Cell FI's avatar

$120K in tokens for a port this size sounds cheap until you get to the 15 child sessions choking the laptop, which makes me think the real bottleneck was tests and builds, not the model. Did GitHub share how much human review time went into checking what the agents produced?

Justin Lassiter's avatar

the fleet thing is what stuck with me, like fifteen agents all working at once and humans just checking the architecture and the risky bits, that's kind of the dream setup right there and also kind of terrifying when you think about the regressions. Great post

Travis Wright's avatar

Almost 800K lines of TypeScript ported to Rust using the Copilot app itself is the snake eating its tail and getting faster. The coordinating agent splitting work and spinning up other agents is the part I'd steal, because the bottleneck stops being typing and becomes the human who has to trust the diff. Senior reviewer of a very fast, very confident intern army is the job description now.

Abhishek Pan's avatar

serde_json writes an f64 holding 3 as 3.0, and Go's encoding/json won't unmarshal 3.0 into an int field, so that kind of break shows up in the SDKs first. Tests that compare parsed JSON in JS won't catch it, since JSON.parse gives 3 for both. A byte-level diff of a few recorded responses would.

Ruben Dominguez's avatar

the cancellation regressions are where I'd spend the human review time. A request can return the right value and still leave work running after the caller has gone away. I'd want a migration test that cancels at several points, checks that child work actually stops, then starts another session to catch leaked state

Keeping the old end-to-end tests unchanged is a good baseline, but the bugs found during the port should become new tests too. The risk-tiered review approach here fits that split: automate broad checks, put people on lifecycle and interface changes, and keep rollback cheap https://www.the-ai-corner.com/p/ai-code-review-claude-code-team

Brian Mahoney's avatar

Excellent article, thank you, I appreciate the visibility into the detailed planning and execution, as well as the costing. This was very well planned from a caching/reuse perspective and saved a ton of money, with the estimated cost of ~ $120K in AI token costs, roughly 136 billion tokens.