A spend cap is a containment control, not finance hygiene: it is the only thing standing between a looping agent and the firm’s whole quota, and the two tools most firms reach for (cloud anomaly detection and gateway token quotas) both have holes exactly where agent spend lands.

The mechanism

Cost control for agents is three separate jobs that get conflated: attribution (whose spend is this), enforcement (what stops it), and detection (when do we find out). Different layers do each one, none does all three, and the gaps between them are where the incident lives.

The sharpest trap is that AWS Cost Anomaly Detection is a post-hoc report rather than a circuit breaker, and it excludes AWS Marketplace and third-party LLM charges, including Anthropic Claude models on Amazon Bedrock, which bill under the legal entity “Anthropic, PBC.” AWS’s own documentation says so and points instead to AWS Budgets with a Billing entity filter. A firm that switches on anomaly detection and assumes agent spend is covered has built a blind spot precisely where agent spend arrives. Even where it does apply, Cost Explorer data lags up to 24 hours, a new monitor needs a day of history and a new service ten days.

Gateway token quotas are the enforcement layer people expect to be a ceiling, and they are a governor. Azure API Management’s llm-token-limit policy will enforce tokens-per-minute (429) or a quota over an hourly-to-yearly window (403), keyed on any policy expression (per user, per agent, per product) at global, workspace, product, API or operation scope, against OpenAI, Anthropic and Google Vertex schemas, and can emit remaining-token headers for chargeback. The documentation is also candid about the limits: counters are tracked independently at each gateway and multi-region gateways do not aggregate; with prompt-token estimation off, the request goes to the backend and the overage is detected from the response, so the firm pays for the request that breaks the limit; concurrent requests can temporarily exceed the configured limit; streaming always estimates and image inputs can overcount at up to 1,200 tokens each. That makes it useful as a governor and inadequate as a spend ceiling, so it belongs paired with a billing-side cap.

The platform layer is further along than most write-ups assume. Copilot Studio supports per-agent monthly consumption limits, with the Power Platform admin centre listing every billing agent tenant-wide alongside its configured credit limit, month-to-date billed credits, owning environment, and a status of within / nearing / over limit; an admin can disable an agent from that page. Two guardrails attach to each limit: notifications to environment and tenant admins as usage approaches, and a hard stop that disables the agent when it is reached. Separately, tenant overage enforcement fires at 125% of prepaid capacity, disabling custom agents while in-flight conversations finish. That 125% matters: the tenant backstop permits a quarter of overspend before it bites, making it a circuit breaker rather than a budget.

Attribution has two specific holes worth knowing. Microsoft’s unit of isolation is the environment and the billing plan rather than the department, and there is no department dimension, so “per-department metering” only works where environment boundaries were already drawn on departmental lines, which for a 40-to-500-person fund is a design decision rather than an inheritance. And bring-your-own-model usage through Azure Foundry bills separately, never reaching the Copilot Credit meter at all, so any agent wired to an external model is invisible to the meter under observation.

At the model-vendor layer, Anthropic’s workspaces carry per-workspace monthly spend limits and rate limits with spend-threshold notifications, per-workspace usage and cost reporting, and API keys scoped to a single workspace. The caveats matter for design: the default workspace cannot carry spend or rate limits at all, and per-user monthly spend limits exist only in the auto-created Claude Code workspace, which leaves per-workspace budgeting generally available and per-user budgeting unavailable.

One claim to be careful with. Vendor maturity guidance says teams don’t allocate or monitor token, usage and capacity cost, so spend grows without visibility. The direction is right and the strong form is stale: the FinOps Foundation’s 2026 survey (n=1,192 practitioners) reports 98% now managing AI spend, up from 31% two years earlier. That sample is FinOps practitioners at large cloud spenders, and “manages AI spend” means the cloud bill rather than per-agent attribution for citizen-built agents, so the gap this control addresses is real and narrower than the anti-pattern implies. (The widely circulated “73% of organizations blew their AI budget” figure is attributed to that report by secondary blogs, appears nowhere in the Foundation’s own summary, and should not be used.)

What to do

Give each agent, or each small group, its own billing scope with a hard ceiling. One API key or workspace per meaningful unit, capped, so a runaway loop exhausts one budget instead of the firm’s quota. This is architectural, working with nobody watching, and that is the reason to accept the overhead of separate scopes.

Never let a citizen experiment share a rate limit with a production workflow. The cheapest version of this control is a boundary drawn at design time, and the failure it prevents is the one that actually happens.

Set the platform-native per-agent limit and the tenant backstop, and know the difference. The per-agent limit is the budget; the 125% tenant enforcement is the last resort. Configure the notification thresholds too, because a hard stop with no warning turns a cost event into an availability event.

For billing-side detection, use budgets with an explicit billing-entity filter rather than generic anomaly detection, because that is what actually sees third-party model charges. Then treat whatever it reports as next-day news.

Put a cost line in the registry next to the owner. Attribution the owner cannot see leaves behaviour unchanged, and the reason to collect it is less the bill than that registry review cannot decide what to retire without knowing what things cost. See agent inventory for where the field lives.

Blow one up on purpose. Run an agent into its ceiling in a non-production scope and observe whether it stops, who is told, how long it took, and what else broke. This is the only way to find out whether what was configured is a limit or a suggestion.

How you’d know it’s working

Per-agent spend for last month can be produced, attributed to a named owner, without asking finance. If the smallest reportable unit is “the OpenAI bill,” the firm has detection and no attribution.

An agent has actually hit a ceiling and stopped, and someone can name it. Untriggered limits are untested limits.

The number reconciles. Compare gateway token counters against the provider invoice for one month; the gap measures how much traffic bypasses the chokepoint assumed to be enforcing.

What this doesn’t solve

A ceiling caps damage without preventing the loop. The agent still burned its budget, still failed to do the work, and probably still needs the architectural fix in runtime guardrails or a corrected delegation pattern.

Cost visibility and value measurement are different questions. Ranking agents by spend says nothing about which ones are worth keeping, the cheapest agent in an estate may be the one quietly producing wrong numbers, and telling those apart needs evals.

Nothing here touches repricing exposure. Every control on this page manages consumption; none manages the price per token, which is set by a supplier who can change it, cap it, or deprecate the model underneath. That is a vendor-management problem, covered under external partnerships and vendors, and the mitigation is contractual and portability-based rather than technical.

Finally, the enforcement points are approximate by design. Gateway counters fail to aggregate across regions, estimation overcounts images and streams, and the request that breaks the limit is usually still paid for. Treat every number in this control family as accurate to within a meaningful margin, and set ceilings with headroom rather than precision.

See also