Q&A · AI spend
One engineer’s agent burned through our AI budget over a weekend. How do we stop it happening again?
Since coding agents started running for hours on their own, this question has gone from rare to routine. Here is how we would answer it.
Nythrex team · 10/29/2026
The question
Asked by a CTO · the way we usually hear it
“A developer left a coding agent on a long task on Friday evening. By Monday the API key had spent more than the whole team usually does in a month. Nobody did anything wrong on purpose. What controls should we have had?”
Short answer
Put the hard stop where the money is spent: spend caps at each provider, per organisation and per user or key. Then make sure every euro can be traced to a project and a piece of work, so that when it happens again you know what it bought. A monthly invoice and a dashboard you check on Fridays will never catch a weekend.
Why this keeps happening
Seat-based tools had a ceiling built in. Agents don’t. They are billed by tokens or compute, they run while people sleep, and one long task can cost more than a month of normal use. The vendors know it and are adding limits themselves.
- Anthropic, July 2025. Announcing weekly limits for Claude Code from 28 August, Anthropic said some users ran it continuously in the background, and that one user consumed tens of thousands of dollars in model usage on a $200 plan.
- Anthropic, August 2025. Claude Code on Team and Enterprise plans came with spend limits that admins can set at organisation and individual user level.
- Cursor, June–July 2025. After moving Pro from a request count to usage billed at API rates, some users were charged extra when no spend limit was set. The CEO apologised and the company offered refunds for unexpected usage between 16 June and 4 July.
Where each control belongs
| Control | What it does | What it doesn’t do |
|---|---|---|
| Spend cap at the provider, per org and per user | Stops the spend | Tell you what the spend was for |
| One API key per project or environment | Limits the blast radius of one runaway task | Help if keys are shared across projects |
| Budget alerts at 50%, 80%, 100% | Warns early | Stop anything on its own |
| Spend linked to project and pull request | Explains what happened and whether it was worth it | Prevent the spend |
| A short weekly review | Catches slow drift before it becomes normal | Catch a single weekend |
What we’d set up this week
- 1
Turn on caps everywhere
Organisation and per-user limits in every AI provider you pay. If a plan doesn’t offer caps, that is a reason to reconsider the plan. - 2
Split keys by project
No personal keys on shared billing, no single key for the whole company. One key per project or environment keeps a runaway task contained. - 3
Budget unattended runs
Agents that run overnight get a time box and a budget, the same way a long CI job gets a timeout. - 4
Alert before, explain after
Alerts tell you something is burning. Attribution tells you which project, which task and whether the result shipped. - 5
Review without blame
Treat the weekend like an incident: what ran, what it cost, what it produced, what limit would have stopped it. The engineer is not the root cause.
Where Nythrex helps — and where it doesn’t
What it does
Shows AI spend from Claude Code, Codex and GitHub Copilot by project, team, person and period, tied to the change it went into. AI spend with no project stays on its own line instead of disappearing into a total. An optional weekly email brings the highlights to you.What it doesn’t
It is not a spend limiter: caps belong in each provider’s console, where they can actually stop the spend. Nythrex explains where the money went and what it produced.
Frequently asked questions
How do I stop a coding agent from overspending?
Set spend caps in each AI provider at organisation and user level, give each project or environment its own API key, and give unattended agent runs a time box and a budget. Alerts warn early, but only a provider-side cap actually stops the spend.
Did Anthropic limit Claude Code usage?
Yes. In July 2025 Anthropic announced weekly limits for Claude Code on Pro and Max plans from 28 August 2025, saying some users ran it continuously and one consumed tens of thousands of dollars in model usage on a $200 plan. Team and Enterprise plans offer spend limits at organisation and user level.
Can a cost dashboard prevent runaway AI spend?
No. A dashboard or report explains spend after the fact. Prevention belongs in the provider’s spend caps; attribution to projects and pull requests tells you what the spend bought and which limit would have stopped it.
Read next
- The AI bill nobody owns: seats, credits, API keys and the corporate cardAI reaches software companies through seats, usage credits, API keys and expense reports. Finance sees vendors, engineering sees tools, and nobody sees the total by product. Here is how to fix it before the next renewal.Read
- The flat seat is over: GitHub Copilot now bills agent work by the tokenSince June 1, 2026, every GitHub Copilot plan meters chat and agent work in AI Credits at model API rates. What changed, what it means for engineering budgets, and how to keep the bill explainable.Read
- Claude Code and Codex cost tracking by project and PRSee what Claude Code and Codex cost your team by project, person, pull request and period. One command per machine — no code, no prompts.Read
Stop guessing.
Start seeing.
No card and no subscription: paid plans have not launched yet.
