Hopwise Labs
Request a pilot
Study

We built an AI dev team. 79% of the bill went to roles that don’t write code.

A team of eight AI agents merged 419 pull requests in one week on our own product, with no human developer. 79% of the $2,378 in tokens went to the roles that review, test or manage, and 48% went to rework. A coding agent holds up, but an agent team modeled on a human one doesn’t yet.

Everyone promises teams of AI agents that build software on their own. We ran one for a week on our own product, with no human developer, and traced each of its 38,500 model calls back to its run and its ticket. It got 419 pull requests merged, for 416 tickets. It also spent the equivalent of $2,378 in tokens, and 79% of that went to the roles that don’t write code. Of 2.56 billion tokens, the model produced 24 million, less than 1%. The rest went to re-reading context.

Our conclusion after those 38,500 calls is that an agent that codes holds up, but a team of agents organized like humans doesn’t yet. We had built eight roles. Version 2, which we’re designing now, keeps one and hands the rest to code.

The short answer

An agent now writes code that reaches production: in one week, 419 agent pull requests were merged, for 416 tickets. It works alone, with no screen, since Claude Code runs in a container with nobody in front of it, no GitHub token, and no access beyond what we grant it. The model isn’t the problem: a test team on DeepSeek took its tickets all the way to merge for $0.80 in total.

What doesn’t hold up yet:

  • Copying a human team doesn’t work. The agents hand the ticket back and forth, and 48% of the spend goes to rework.
  • Handing management to the model is expensive. It picks the next task, summarizes state and routes work, and it gets things wrong with confidence.
  • You can’t do without a human. Someone still has to write the plan and decide what no rule can decide.

The clearest evidence is the merge gate. It’s plain code, and it refused 58 pull requests that the QA agent had approved, one in eight. In 16 to 25 of them, a check was red while QA had said “good to merge”.

An agent that codes works, as long as it’s boxed inside deterministic code that verifies everything else.

The week in nine numbers What it measures
79% of the spend went to roles that review, test, manage or arbitrate; the two developers account for 21%
under 1% of 2.56 billion tokens were produced by the model (24 million); the rest is context re-read or rewritten on every call
48% of the spend ($1,139) is the same agent coming back to the same ticket
60% of the spend ($1,428) is cache writes at the one-hour rate, about $535 of it avoidable with one variable
177,000 tokens of context for the project manager to pick the next ticket
×2 the cost of a merged PR within the week, from $4.23 on November 9 to $8.56 on November 13
416 tickets closed by 419 merged pull requests in one week, with no human developer; a merged ticket costs $3.82 at the median
58 pull requests approved by the QA agent and refused by the merge gate, one in eight
$164 the cost of the most expensive ticket of the week, the one where the project manager picks the next tickets

A human org chart, staffed by eight agents

I’m building a console that runs teams of AI agents to develop software. The first customer is us, since the agent team builds the console itself.

I organized the agents the way you organize people. Each one had a role and handed the ticket to the next with a Linear label:

  1. the project manager scopes the ticket and answers questions;
  2. a developer (API or screens) opens a pull request;
  3. the reviewer accepts it or asks for a rework;
  4. the QA tests it on a preview build;
  5. a merge gate replays the checks and merges, then the version goes live and a test suite proves it against the spec.

Around them, a tech lead arbitrated blockers, a resolver reapplied conflicting PRs, and an analyst read the metrics every day. On paper, it was a complete team.

To test this we needed a real factory, not a script on a laptop. The agents run on our own infrastructure, at OVHcloud. A console creates a team, picks its model, and stops it.

Factory architecture, November 2026 · versions read from the code
Factory architecture, November 2026 · versions read from the code

Running Claude Code headless, with no screen

Many teams use Claude Code in a terminal. It also runs headless, with nobody in front of it, in a container, and that’s how the factory uses it.

One run, three steps that share no secret

Each run is a Kubernetes Job launched by Argo Workflows, in three steps:

  1. clone fetches the repository with a read-only token;
  2. agent runs Claude Code, with no GitHub token at all;
  3. publish, our own code, pushes the branch and opens the PR. It refuses forbidden paths, anything that looks like a secret, and changes that are too large.

The container runs without root, with no Linux capabilities, no Kubernetes token, and a maximum duration. We verified it on November 15 across the 16 deployed Job templates. The agent writes code, but it never holds what it takes to publish it.

The command, simplified

claude -p "$TASK" \
  --model "$AGENT_MODEL" \
  --mcp-config /work/mcp.json --strict-mcp-config \
  --allowedTools "Read Edit Write Glob Grep Bash mcp__github__pull_request_read" \
  --disallowedTools "WebFetch WebSearch" \
  --max-turns "$MAX_TURNS" \
  --output-format stream-json --verbose
  • -p runs Claude Code in headless mode, with no interface. It reads the task, works, then stops.
  • --strict-mcp-config loads only the MCP servers we provide.
  • --allowedTools gives the exact list of tools. In -p mode, a call that would ask for permission is refused (documentation), so our runs don’t use --dangerously-skip-permissions.
  • --max-turns bounds the work to 80 turns for a developer, and 60 minutes at most.
  • stream-json emits one event per line. The last one says whether the run succeeded, and our code reads it.

The role’s mission and its skills make up the task. Every skill is part of the agent’s fingerprint. When a skill changes, the agent gets no real work until an evaluation shows it does at least as well. Before each deployment, a check also verifies that every technical name a skill cites really exists in the code. A skill can’t teach the agent a fact that has become false.

Reliability: the agents held, what surrounds them didn’t

Of the week’s 165 hours, the factory could ship for 87 (53%). It was blocked for 47 hours (28%) by causes outside its control, and I had stopped it on purpose for 31 hours (19%) while Claude Code worked alone. Counting only the 134 hours it was meant to run, it shipped 65% of the time and was blocked 35%. Over the first 58 hours it had been blocked 63% of the time, so the second half of the week was clearly better.

What blocked it Hours How
Linear free-plan ticket limit 14.9 Paused, because the project manager could no longer create a ticket
GitHub Actions minutes exhausted 14.5 10.0 h “running” with no merge at all, then 4.5 h paused
Cluster storage full 8.8 Runs would no longer start, and one stayed “in progress” for hours; 1.1 h “running”, then an automatic pause of 7.7 h
Gateway database full 6.9 “Running”, while every run failed at the publish step
Automatic pauses (5 or 6 tickets waiting for a human) 1.8 The factory stops by itself until someone resumes it

Part of the blocking went unnoticed. For 18 of those 47 hours the factory was “running”, for 10 hours with no CI, 1.1 with no storage and 6.9 with a full database. Nothing could be merged, and nobody knew. A factory that runs without producing anything is a bigger problem than one that’s stopped, because nobody sees it.

What held What broke
0.4% of model calls failed 3.8% of tool calls failed, and one ticket save in eight
None of the 540 merged pull requests was reverted The QA agent approved 58 pull requests that the merge gate refused
A sample audit of 20 PRs found no serious defect CI minutes, cluster storage, the Linear API
No agent tried to touch a forbidden path Our own memory limits
The merge gate caught what QA let through The spending cap, absent on the main team

Model calls rarely fail, 165 times out of 39,017, or 0.4%. Tool calls fail far more often, 4,059 times out of 106,832, or 3.8%. One ticket save in eight failed, and a quarter of PR reads failed on the reviewer’s and the QA’s servers. A failed tool call often costs the model one more turn.

The model was never the limiting factor. In one week, Anthropic refused 2 calls for rate limiting, and Linear refused 1,125. The blocking came from the services around it and from our own memory limits, with 57 out-of-memory lines in the week’s logs.

What the agent can’t do, whatever it decides

An unsupervised agent is sometimes wrong. We don’t count on its caution. Every limit is set in the infrastructure, where the model can’t argue with it.

Layer Guardrail What it prevents
Network Everything is denied by default. A team reaches only DNS, the gateway and port 443 of the Internet, never a private address. The factory’s own agents reach only the gateway. Leaving the perimeter, touching another service in the cluster
Resources Each team has its own Kubernetes namespace, with a quota of 6 pods and 3 CPUs. A paused team has a quota of 0 pods. Argo semaphores bound parallel runs. One team overflowing onto the others
Money Test teams are capped agent by agent, and the publish key calls no model. The console team, on the subscription, had no cap. Its €200 monthly budget was only indicative, with nothing to enforce it, and the week came to more than ten times its equivalent at list price. On the subscription, the real limit is the subscription’s quota, which the gateway doesn’t see. A loop that spends without end (not on the subscription)
Time A run has 80 turns and 60 minutes at most, then Kubernetes stops it. A run that never ends
Secrets They live in OpenBao (2.7.1). Each service connects with its Kubernetes identity, for 15 minutes. The console API can write a customer’s model key, never read it back. A key leaking through the console or an agent
Publishing Our code refuses forbidden paths, anything that looks like a secret, and changes that are too large. Only a human can lift that size limit. An agent pushing a secret or rewriting the repository
Merge The gate replays the checks on a clean copy, at the exact commit. A sensitive file (identity, permissions, secrets, CI, Dockerfile) waits for a human signature on that precise commit. A PR that is green on the agent’s side but red elsewhere, or an unseen permissions change
Factory Before each pass, the dispatcher reads the factory’s state. Without a clear “running” answer, it hands out nothing. The factory restarting by itself after an emergency stop
Teams Argo CD (v3.5.6) creates teams from the console, but its project can only create team-* namespaces and a few object types. A team created from the console getting more rights than intended

People sign in through Zitadel. Each person’s role decides which buttons are shown, but it’s the API that checks every call, with the person’s Zitadel token (check active in production, verified on November 15).

Over the week, the publish step refused two test files that looked like they held a secret, and eight empty runs. It saw no forbidden path and no oversized change. We haven’t checked whether those two were real secrets or false alarms on sample values. The merge gate is the guardrail that worked hardest, with its 58 refusals.

79% of the bill isn’t code

From November 8 to 15, the agents got 419 pull requests merged, for 416 tickets, in 1,998 runs and 38,500 calls to Claude. The cost was $2,378 at list price. A merged ticket costs $3.82 at the median, and one in ten costs more than $9.21. The most expensive 10% of tickets account for 37% of the spend. Almost all of it (99.96%) is Claude Opus 5.5 on the subscription, so these dollars are a list price and not an invoice. I don’t count that cost as a failure. I understood the problem when I looked at where the money went.

LiteLLM gateway, call log (LiteLLM_SpendLogs), detailed cost per call · 38,500 model calls, November 8 to 15, 2026
LiteLLM gateway, call log (LiteLLM_SpendLogs), detailed cost per call · 38,500 model calls, November 8 to 15, 2026

The same dollar can be a cache write, a QA expense and a rework at once, so the three figures in this section don’t add up.

The roles that write code are a fifth of the bill. The two developers together cost $490, 21% of the spend. The roles that review, test, manage or arbitrate cost 79%. QA is the most expensive, in total and per run, at $920 overall and $1.54 per run at the median, in 27 calls.

The agents re-read more than they write. 99% of tokens are input, the context sent again on every call. The cache works, but every call writes the files read and the test outputs into it, at the one-hour rate, while a run’s calls follow each other a few seconds apart.

One prompt caching setting cost us more than anything else. On a subscription, Claude Code writes its prompt cache for one hour by default; with an API key, for five minutes (documentation). A one-hour write costs twice the input price, a five-minute write 1.25 times. Our runs chain their calls a few seconds apart, so the hour bought nothing. Of the week’s $1,428 in cache writes, five minutes would have saved about $535. The fix is one variable, FORCE_PROMPT_CACHING_5M=1.

The agents hand the ticket back and forth. A ticket that QA ended up approving went through it 1.8 times on average; 43 tickets went through three times or more. Every round trip replays the whole context.

The “management” roles cost the most per run. To fill the work queue, the project manager re-read 160,000 to 177,000 tokens of context, between $3 and $5.30 per pass.

The most expensive ticket of the week was a management ticket, the standing one where the project manager fills the queue: $164 in 54 runs, with context up to 175,000 tokens. With its twin for the other teams ($111), it cost as much as 70 median tickets. The next eight are tickets that kept bouncing between send-backs, conflicts and outages.

The cost of a merged PR doubled within the week, from $4.23 on November 9 to $8.56 on November 13.

Some calls are free in dollars but still add load. The gateway relayed 29,318 ticket reads and 14,184 ticket listings to Linear, more than 6,000 a day. That volume weighs on the Linear API quota, which was saturated on November 13; we haven’t proven it’s the only cause.

Four ways to go in circles

Looking at the runs one by one, the same four mechanisms show up every time.

The relay

Every handoff starts a new run, which re-reads the ticket, its comments and the code before writing a line. A QA that sends work back to the developer therefore costs three full reads: its own, the developer’s, then the reviewer’s on the way back. That’s where the 48% of rework comes from.

Management handed to the model

Picking the next ticket is a sort by priority and finished dependencies. Our project manager did it by re-reading up to 177,000 tokens, and 10 of its 75 passes failed. The analyst’s first run, on November 13, stopped after 45 minutes without a single proposal.

The tool built for humans

On November 13, the Linear API quota was saturated. On the 15th, connecting a new team blocked on an OAuth application “already installed”, which had to be revoked by hand. The application couldn’t create labels in a Linear team it wasn’t a member of, and each team needs 12. None of these outages touches the product. All of them come from the coordination machinery.

State narrated instead of read

An agent that describes the system’s state in prose ends up stating things that are false. The project manager of one of our test teams answered with another team’s deployment state. Another announced that a ticket couldn’t be created, when it had been, a few minutes later. State must be read by code, from a database, and never summarized by a model. The same rule holds for an incident post-mortem, whose timeline is compiled from the tools.

The shutdown, with a written plan and a single agent

On November 14, I stopped the factory to restart from a sound base. I asked a single agent, Claude Code, to do the work itself, following a plan frozen the evening before. The plan fit in one document, with batches in order, each with what it must make possible and its state. There were three rules: tests first, a fully green CI before merging, and “done” only when proven live.

In about 27 hours of shutdown, spread over two days:

  • the plan’s 11 batches of screens are live;
  • deployment was verified by a simulator across 500 random scenarios, which found 7 defects, and a merge is proven live in 9.3 minutes at most;
  • 76 of the spec’s 107 lines are proven live, none red;
  • the 19 pull requests that were lingering are all closed, merged or rejected with their reason.

The result is clearly better, with the same model. The handoffs were gone, along with the ticket queue to fill and the roles that re-read everything to decide who gets the work next.

Never use an agent for what code can do

Going back over each role, I saw that most of their work was rules disguised as judgment. A model that reruns tests or sorts a queue is a slow, expensive and not always reliable script. We apply the same rule to operations work: a script first, then an agent.

Role What code does better What really needs a model
QA Run the acceptance tests, measure speed, compare against the mockups Nothing, if every criterion has its test
Reviewer Format, lint, types, size, sensitive files, tests present Say whether the PR meets the need
Project manager Pick the next ready task, check that it cites its spec line Help write the plan
Conflict resolver A rebase that passes without conflict The real conflicts
Tech lead Routing by rule, to arbitration after two rejections and to a human for a closed list of cases Decide on the substance
Analyst Rates, cost per task and rework, with a SQL query Propose what to change

The week measured it. Of 434 pull requests that the QA agent approved and sent to the merge gate, the gate merged 376 and refused 58, one in eight. In 16 of them a check replayed on a clean copy was red, and in 9 the PR’s pipeline was red. Depending on how those two overlap, that is 16 to 25 cases where a check was red while QA had said “good to merge”. The rest had other causes, such as a conflict or a base that had moved. QA was the most expensive role, at 39% of the spend, and the merge gate caught what it let through.

So the agent is only needed for two things: writing the code, and judging the cases no rule can settle. Everything else is code, from the merge gate and the deployment to the proof against the spec and the measurements.

Same logic for the tracking tool. Linear is built for humans who coordinate. An agent only needs a plan in Markdown, versioned with the code, whose lines the code ticks when the proof is green.

What this changes in the development cycle

In an agentic development cycle, the agent holds one step: development. Every other step is a deterministic control.

Step of the cycle Until now In version 2 (planned)
Plan, scope Project manager (agent), Linear tickets plan.md, written by a human; code picks the next task
Develop Developers (agents) One agent, the only one that codes
Review Reviewer (agent) Rules in code for format, types, size and sensitive files. The judgment “does it meet the need” is still to be settled.
Test QA (agent) on a preview build Acceptance tests, one per spec line, run by code
Merge Merge gate (code), plus a human signature on sensitive files Unchanged
Deploy Deployer (code), automatic rollback Unchanged
Prove, operate Suite against the spec, observability, alerts Unchanged, and code ticks the task
Measure, improve Analyst (agent) SQL queries, like the token report

Version 2: a plan file and an eight-step loop

Version 2 isn’t built yet. This is its design, based on what worked during the shutdown. Each team will have a plan.md file at the root of its repository, versioned with the code:

# Plan · Agent console

## Batch 1 · Validate the plan
- [x] Tickets created on validation · proof: spec plan-tickets · PR #702 · v0.6.129
- [ ] "Validate / Correct" card · proof: spec plan-carte

One line is one task, with the spec line that proves it. Only code will change the boxes. A task will be ticked only when its proof turns green on the live version; the code then records the PR and the version.

A team’s loop in version 2 · 2 agent steps, 6 steps in code
A team’s loop in version 2 · 2 agent steps, 6 steps in code

The planned loop fits in six code steps and two agent steps. The agent will receive the task, its spec line and the repository, nothing else. If verification or proof fails, it fixes on the same branch by reading the failure output, three times at most. On the third failure, the task goes to “blocked” and the console alerts a human. No model decides whether it’s done.

Others reach the same place

This diagnosis isn’t ours alone. Studies and other teams reach it from different starting points.

  • A lab study measured the same imbalance. Researchers at Concordia University traced token use in ChatDev, a framework that simulates a software company with a product manager, a programmer, a reviewer and a tester (Tokenomics, January 2026). Across 30 tasks, code review took 59.4% of the tokens on average and coding 8.6%.
  • A team running a fleet of coding agents found the same levers. Alexander Marquardt published ten weeks of measurements on up to a dozen background agents with a review agent (November 2026). Tokens per merged PR fell about 5.5 times after he ended each agent after one task, kept waits under the cache lifetime, moved rules into deterministic code and CI gates, and had a program handle queueing in place of the model.
  • Researchers at Berkeley published a taxonomy of the ways multi-agent systems fail (Why Do Multi-Agent LLM Systems Fail?).
  • Cursor dropped its integrator role. In its account of coordinating many coding agents, the team writes that a dedicated role for quality control and conflict resolution “created more bottlenecks than it solved” (January 2026).

Stripe describes its “minions”, agents that produce more than 1,300 merged pull requests a week (part 1, part 2). Their core is called blueprints, workflows written in code that alternate deterministic nodes (run the linters, push the changes) and nodes where the agent works freely (implement, fix the CI). They also bound the retries to two CI passes at most, and then the branch goes back to a human.

It’s the same idea as ours, and each of us got there independently. Our week adds four things:

  • Dollars per role, on a real product. The lab study counts tokens on a benchmark, and the accounts we read publish no dollars per role. We have the gateway’s bill for a week of agents organized as a team, role by role.
  • Reliability in hours: how long the factory could ship, what blocked it, and the 18 hours it kept running, unnoticed, while nothing could merge.
  • A merge gate that overruled the QA agent. It refused 58 pull requests that the agent had approved.
  • A stricter definition of “done”. At Stripe, the run ends on a PR that passes CI, reviewed by a human. In our setup, the task is ticked only when the spec line it targets turns green on the live version.

Our remedy isn’t proven by any of them, or by us. Marquardt keeps a review agent and gets good results, and Stripe keeps a human review. Removing every model from review is our hypothesis, and version 2 will have to show it.

What we haven’t proven yet

This article draws its conclusion from a single week, and several points are still unproven.

  • The single agent wasn’t left alone. During the shutdown, Claude Code worked in a session, and I was there to decide. The new loop will have to hold without me, and I haven’t seen it run that way yet.
  • Its cost isn’t measured the same way. The $2,378 comes from the gateway the agents went through. The work done during the shutdown didn’t go through it, so the cost comparison remains to be done.
  • “Clearly better” is my judgment. It rests on what reached production, proven against the spec, not on a controlled experiment.
  • A human still writes the plan. Cutting it into tasks that each cite their spec line is work. That’s where the agent can help, and it’s the next thing to measure.

Quality is measured on a sample, not proven. None of the 540 pull requests merged into the repository that week was reverted. Twenty PRs were drawn at random, with a fixed seed, from the 127 merged by the gate from November 8 to 11, and three reviewer agents checked them against their ticket. 17 had no defect, 3 had minor defects, none had a major or critical one. With 0 serious defects in 20, the true share of PRs with a serious defect is below 14%, with 95% confidence. This audit has three limits. The auditors are Claude agents, like the team they audited. They read the tests without rerunning them, and the sample covers only the first three days.

What I’m keeping

  1. Don’t copy the human org chart. Roles and handoffs exist to coordinate people. For agents, they multiply context re-reads and round trips.
  2. A written plan, an agent that codes. The plan says what to do and in what order; the agent writes the code and its tests.
  3. Code decides what is done. None of the tests, checks, deployment or proof goes through a model. “Done” means “proven live”.
  4. Measure the tokens before optimizing. I thought I was paying for the agents’ thinking. I was mostly paying for rework, and for a cache set to one hour by default for calls a few seconds apart.
  5. The model is a setting. A team on DeepSeek took its tickets all the way to merge, in 225 calls for $0.80 in total.

So I’m changing the factory accordingly, for all our teams, with no more Linear, a plan in Markdown, one agent per team, and code everywhere else.

What the week tells us

An agent that codes well, fast and cheaply holds up, inside a frame that leaves it nothing else to do. A team of AI agents that organizes itself like a human team ships too, but it goes in circles and it costs a lot. Yet that’s what an “autonomous AI developer team” offer often promises.

The next article will measure version 2 the same way, whether or not it proves us right.

Technical reference for the engine, the model, the gateway and the proof

The rest of the setup, for those who want to check our numbers or rebuild the parts.

On November 15, a team created from scratch in the console received its Kubernetes namespace, its keys, its MCP servers and its agents within minutes, without a single manual step. It then took its first ticket all the way to review. That machinery works. The week only called into question what we ask the agents to do inside it.

Temporal, the engine

A ticket’s path is a Temporal workflow (server 1.32) with eight steps: scope, develop, review, verify, merge, deploy, prove and report. Temporal holds the state of every ticket. A cluster restart loses nothing, and a failed step resumes where it stopped.

When a step doesn’t pass, the workflow has four exits, written in code: arbitration, setting the ticket aside, repairing an outage, or the founder’s gate. That gate can wait for hours. The workflow sleeps until the answer arrives from the console, then resumes. The deployment simulator runs this same engine code against a simulated world, scenario after scenario.

Temporal will remain the engine of the next version. But the loop it carries will have only two agent steps left.

The model, behind a gateway and on the subscription

Claude Code can talk to a gateway instead of Anthropic directly. All it takes is ANTHROPIC_BASE_URL and a token in ANTHROPIC_AUTH_TOKEN (documentation). In our setup, every agent has its own gateway key, and the gateway decides the model, the budget and the tools.

To run Claude Code in the cloud on a Claude subscription, the claude setup-token command creates a token valid for one year, to place in CLAUDE_CODE_OAUTH_TOKEN. The documentation intends it for CI and scripts, and reserves it for Pro, Max, Ultra, Team and Enterprise subscriptions (documentation). We keep that token in the OpenBao vault, and the run sends it through the gateway with the agent’s key in a header, so budget, tools and logs stay those of the agent. Before using a subscription to serve other people, read Anthropic’s terms, because the technical documentation says nothing about it.

We haven’t tried advisor mode yet. Claude Code offers an experimental mode where a stronger model advises the one doing the work, at decision points (--advisor opus, documentation). It requires Anthropic’s API. Our next measurement is a cheaper model that codes, with Opus speaking only when needed.

The gateway, a single crossing point to models and tools

No agent talks directly to a model, to GitHub or to Linear. Everything goes through a LiteLLM gateway (v1.106.3), and it carries most of the guarantees.

  • Each agent has two keys. The first calls its team’s model, with a share of the monthly budget. The second, for publishing, calls no model and is capped at $1 a day.
  • Tools are granted key by key. The GitHub and Linear MCP servers are registered in the gateway, one per team. Each key carries the list of servers and tools it may call, and a role with no list is refused instead of left open. The reviewer can read a PR, not merge it.
  • The agent never sees a token. GitHub tokens are App tokens valid for one hour, renewed by the factory, with one read token to clone and one write token for the publish step alone. The customer’s Linear token stays in the vault, behind the gateway.
  • A run refuses to start blind. If an MCP server lists no tool within 120 seconds, the run stops before calling the model.
  • The model is a team setting: the Claude subscription, a model configured in the gateway such as DeepSeek, or the customer’s own key. The console picks it, and the factory’s next pass applies it, with no deployment.

The gateway has its traps too. LiteLLM separates an MCP server’s name from the tool’s name with a hyphen, and so refuses a hyphen in the server name. Our first team with a compound name, “essai-auto”, received no server until we replaced the hyphen in the name.

Observe, prove, anonymize

Everything is measured

VictoriaMetrics and VictoriaLogs (with Vector) keep the metrics and the logs. Grafana 12 displays them, and vmalert fires the alerts for a pod in a restart loop, a failed run, a stopped dispatcher, a deployment that has been failing for 15 minutes. Each run pushes a measurement when it ends, with its outcome, its minutes, the checks that regressed and the files changed. Finished runs stay two days in the cluster, then one year in Argo’s archive.

The gateway logs every model call, with its detailed cost and the Claude Code session that made it. One session is one run. That’s what let us tie each of the week’s 38,500 calls to its run, then to its ticket, and find where the money went.

“Done” is proven live

The console’s spec fits in 107 lines: 95 behaviors and 12 speed lines, one per page. Each line has its Playwright test, which carries the line’s identifier. After every deployment, the suite runs against the real address. A ticket is proven only if its lines are green and no green line has turned red.

Speed has its thresholds, written in a single file: TTFB ≤ 100 ms, LCP ≤ 1 s, INP ≤ 200 ms, CLS ≤ 0.1. They are checked on every PR, then after every deployment. We learned to measure from the right place. From GitHub’s machines, the network alone added 371 to 559 ms of TTFB. So the suite runs from the cluster, in France, like a European user.

Deployment is itself code. Every merge produces a version and its images. The deployer puts the latest complete version live, and returns to the previous one if the new one doesn’t respond. A simulator plays this deployer and the engine across hundreds of random scenarios. It found 7 defects that production hadn’t yet shown.

What goes to the model is scrubbed

Before every call, a Presidio guardrail passes over what is sent and masks emails, phone numbers, bank cards and IBANs. It also masks our own patterns, such as GitHub tokens, Anthropic, OpenAI, AWS and LiteLLM keys, private keys, access tokens. Masked values are never put back in the response, so they don’t show up in plain text in the logs. Names of people, places and IP addresses are deliberately not masked. Agent reports also pass through a filter that replaces anything that looks like a secret with “[masked]”.

Frequently asked questions

Can an AI agent team develop software on its own?

Not without a human, going by our week of measurements. The agents do code: 419 of their pull requests were merged, for 416 tickets. But organized as a team like humans, they bounce the ticket between them, 48% of the spend goes to rework, and someone still has to write the plan.

Where does the cost of an AI agent team go?

Into rereading context. 79% of the spend went to the roles that review, test, manage or arbitrate, 21% to the two developers. Of 2.56 billion tokens, the model produced less than 1%; the rest is context reread on every call.

Why did prompt caching cost so much?

On a subscription, Claude Code writes its cache for one hour by default, at twice the input price, while our calls came seconds apart. Cache writes came to $1,428, of which about $535 could have been saved by changing a single environment variable.

Do you need an agent for QA and code review?

Our week suggests not. The merge gate, plain code, refused 58 pull requests the QA agent had approved, one in eight, while QA was 39% of the spend. Version 2 hands tests and review rules to code.

How do you stop a coding agent from overstepping?

By setting every limit in the infrastructure: network denied by default, per-team quotas, at most 80 turns and 60 minutes per run, no GitHub token in the container, publishing and merging done by our code, and a human signature on sensitive files.

Sources