Set hard runtime ceilings for each agent, workload and shared credential so excessive model calls cannot continue unchecked. Pair those limits with alerting on unusual request volume, per-task approval for expensive actions and a kill switch that suspends the identity when consumption departs from expected behaviour.
Why runaway token spend happens in agentic systems
Runaway spend is usually a control problem, not just a model-cost problem. Once an agent can keep calling tools, reissuing prompts, retrying failed steps or escalating to more expensive models, cost can grow faster than the task itself. The failure mode is especially common when spending limits, task boundaries and approval rules are missing or only enforced in the application layer.
Hard runtime ceilings work because they bound the agent’s freedom to continue spending after the task should have ended. The practical goal is not to make every call cheap, it is to make unplanned continuation impossible.
For agent governance and containment patterns, NHIMG’s AI Agent Kill Switch and Containment Guide is the clearest starting point because it ties budgets, quarantine and revocation to a stoppable operating model.
What controls actually stop cost from escaping the task
The most effective controls are layered. A per-agent budget limits total consumption, a per-workload budget limits blast radius across instances, and a shared-credential ceiling stops one compromised or buggy identity from driving unlimited usage across multiple agents. Per-task approval is the right control when the next action would materially increase cost, such as long-running browsing, bulk retrieval, code generation at scale or multi-step orchestration.
Alerting should focus on behaviour, not just invoices. Sudden spikes in request volume, repeated retries, unusually long chains of calls and model downgrades or upgrades mid-task are all signs that the agent is no longer following expected execution patterns. If the control plane can suspend the identity or revoke the token, the kill switch should act on the identity first and the workload second.
For least-privilege and approval-gated agent execution, NHIMG’s AI Agent Authorisation Guide explains why per-action policy decisions are the right place to stop expensive behaviour before it becomes a billing event.
How to design the containment path without breaking useful work
A good containment design separates “pause,” “quarantine” and “terminate.” Pausing is for temporary anomalies, quarantine is for suspected runaway or compromised behaviour, and termination is for confirmed misuse or irrecoverable failure. That distinction matters because many expensive agent behaviours are not malicious, but they still deserve the same hard stop if they no longer match the task objective.
Containment also needs restart criteria. If you suspend an agent too early without preserving state, you may lose useful context and create duplicate spend when the task restarts from scratch. If you restart too easily, the agent can resume the same runaway loop. The safest pattern is to preserve evidence, reset or rotate the credential if needed, then relaunch only with a narrower scope and a fresh budget.
NHIMG’s AI Agent Observability, Audit and Incident Response Guide is useful here because it connects logging, attribution and tested kill-switch behaviour into one operational response path.
Risk and Threat Considerations
Runaway spend is not only a cost anomaly. In agentic systems it can be a symptom of overbroad authority, uncontrolled retry logic, prompt loops or a compromised agent identity, and the same pattern can drive data exposure or destructive actions if the agent keeps acting after it should have stopped.
Failure mechanism: The agent keeps obtaining fresh model calls because no runtime ceiling, approval gate or revocation path is enforced at the point where spending occurs. A buggy loop, a malformed workflow or an attacker-induced prompt chain can keep the identity active long enough to amplify the loss.
Impact: Costs escalate quickly, task boundaries are lost and the same unchecked execution path can extend into tool misuse, data movement or unauthorized changes if the agent still has usable access.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST SP 800-53 Rev 5 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | Runaway spend often follows excessive agent authority and uncontrolled actions. |
| ASI08 — Cascading Failures | Unbounded retries and chained calls can turn a small loop into runaway cost. | |
| ASI10 — Rogue Agents | A misbehaving agent that keeps acting past intent needs containment and shutdown. | |
| Recommendation — Enforce per-action authorization and limit agent privileges before costly steps run. Set runtime ceilings and stop recursive execution paths that amplify spend. Implement a kill switch that quarantines or suspends the agent identity immediately. | ||
| NIST SP 800-53 Rev 5 | AU-6 — Audit Review, Analysis, and Reporting | Alerting on unusual request volume depends on actionable review of usage telemetry. |
| AC-6 — Least Privilege | Cost containment improves when each agent only has the access needed for its task. | |
| IA-5 — Authenticator Management | Shared credentials and token controls are central when suspending or rotating agent access. | |
| Recommendation — Review anomalous agent activity and escalate unusual consumption patterns quickly. Restrict each agent to the minimum access needed for the current job. Rotate or revoke credentials promptly when an agent exceeds expected behaviour. | ||
| NIST Zero Trust (SP 800-207) | 3.1 — Continuous Verification | The answer depends on continuous runtime checks before allowing further agent activity. |
| Recommendation — Continuously verify agent state before permitting more requests or actions. | ||
| OWASP Non-Human Identity Top 10 | NHI-05 — Overprivileged NHI | Shared credentials and agents with too much privilege can drive runaway consumption and impact. |
| NHI-07 — Long-Lived Secrets | Long-lived shared credentials make suspension and containment harder when spend runs away. | |
| Recommendation — Reduce agent privilege so excess usage cannot expand into broader access. Replace long-lived secrets with shorter-lived credentials and revoke them on anomaly. | ||
Practitioner Guidance
What to verify: Confirm that the budget cap, approval gate and suspension action are enforced outside the agent itself, not merely documented in prompts or policy text. If the agent can ignore its own limit, it is not a limit.
Decision rule: If the next call can materially increase spend or expand blast radius, require approval or cut off execution before allowing it. If the agent has already deviated from expected behaviour, suspend the identity first and investigate second.
Practitioner takeaway: The best control is a runtime control, because cost overruns are usually stopped by removing the agent’s ability to continue, not by asking it to self-regulate.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org