Skip to content

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.

An electrician working on an electricity meter mounted on a wall.
Usage-based AI works like a meter: it keeps turning whether or not anyone is watching. Photo: Wikimedia Commons, CC0.

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.
A large column of smoke from a bush fire rising over desert hills.
A weekend is long enough for a small spark to become a bill. Photo: Wikimedia Commons, public domain.

Where each control belongs

Guardrails for usage-based AI
ControlWhat it doesWhat it doesn’t do
Spend cap at the provider, per org and per userStops the spendTell you what the spend was for
One API key per project or environmentLimits the blast radius of one runaway taskHelp if keys are shared across projects
Budget alerts at 50%, 80%, 100%Warns earlyStop anything on its own
Spend linked to project and pull requestExplains what happened and whether it was worth itPrevent the spend
A short weekly reviewCatches slow drift before it becomes normalCatch a single weekend

What we’d set up this week

  1. 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. 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. 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. 4

    Alert before, explain after

    Alerts tell you something is burning. Attribution tells you which project, which task and whether the result shipped.
  5. 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.

How AI cost tracking works

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.

Stop guessing.
Start seeing.

No card and no subscription: paid plans have not launched yet.

Create accountNo card, no subscription