Contenox

AI agent spending limits and API budgets

A coding agent has an overnight job investigating failing tests and a €20 allowance. Whether the allowance holds depends on what happens when several agents try to spend the same remaining balance at once.

Updated

Deutsche Fassung

A budget alert sends someone a message. An enforced spending limit lets the billing service refuse another chargeable request. A time limit stops a job after a given interval. Ten agents working in parallel can consume substantially more in that interval than one. A deadline only bounds the bill if the rate of spending is also bounded.

What OpenAI and Anthropic actually stop#

Control What happens at the boundary
OpenAI API Platform monthly project budget Under Project → Limits, set a budget and notification thresholds. With Enforce a hard limit off, requests continue after the alert. With it on, subsequent requests fail once tracked spending reaches the budget and enforcement takes effect. Some spending can still accrue in that interval.
Claude Platform monthly limit per linked app Linked billing allows an approved third-party app to charge a Claude Platform organisation directly. An Admin or Billing member can set a dollar limit for that app under Linked platforms. The request that crosses the limit is served, and in-flight calls finish. New requests are refused until the limit goes up or the month resets.
Claude Platform billing disconnection Unlink withdraws one app’s billing authority. Anthropic says new calls usually stop within about ten seconds. Calls already running finish and are billed.

The OpenAI budget covers one project. Anthropic applies a default per-app cap separately to each linked app. Four apps at $20 each do not share a single $20 allowance. The organisation’s own spend limit also applies. Linked billing is a beta for participating apps and eligible Claude Platform accounts. OpenAI project budget controls · Anthropic app limits and revocation

Four agents see the same two euros#

Consider an illustrative budget. The investigation has used €18 of its €20. Four agents simultaneously propose one more model call each, with a maximum cost of €1.50 per call. If each checks the last reported balance independently, all four see €2 available. Together they can add €6, taking the job to €24.

A shared spending control can reserve each call’s maximum cost before dispatch. Reserving €1.50 for the first call leaves €0.50. The other three must wait. If that first call actually costs €0.40, the control releases €1.10, enough to admit another request. This works when every agent bills through the same control and the reservation covers the actual maximum. An agent with a separate credential or a tool that charges for web searches introduces a second route to the bill.

What can keep running overnight#

Refusing new model calls still leaves any test processes already running. A fresh working directory for every retry can fill a disk. A schedule can start the same job again the next morning. Alongside the spending allowance, the overnight job needs a stopping point for retries, child processes and temporary working copies. Running inference locally on owned hardware removes the external model charge for those calls. GPU time, disk space and metered external tools are still finite.

A different failure shows the reach of a billing credential. On 12 November 2026 Railway reported at least roughly $740,000 in unauthorised AI-token usage across customers after its 21 October incident. The cause was compromised credentials. With a dedicated API key, the provider can revoke the exposed key. With linked billing, an administrator can instead disconnect the individual app. The usage record then establishes which calls had already incurred charges. Railway’s compensation bulletin · AI governance for businesses