# AX-SYS-21: Bound autonomy with scopes, limits, and spend caps

> Observability and governance · intermediate · AX-SYS-21

Cap what an agent can do per session. Rate limits, scopes, and spending ceilings prevent runaway loops and surprise bills.

## Why

Unbounded autonomy is a documented risk class, not a theoretical one. OWASP LLM10:2025 (Unbounded Consumption) names "Denial of Wallet" as its own failure mode: attackers initiate a high volume of operations to exploit the cost-per-use model of AI services until the bill is unsustainable. An agent stuck in a loop can produce the same volume with no attacker involved. OWASP MCP02 (Privilege Escalation via Scope Creep) adds that loosely defined permissions expand over time. Zuplo's guidance places the control at the gateway, where token budgets, cost control and security meet, and notes that a sudden spike in token use might indicate a runaway agent loop. Hard limits on tokens per session, cost per day, and actions per session belong in that infrastructure layer, not in the agent's prompts or application code, where the agent can reason around them.

Evidence from coding agents points the same way. *SWE-MISBEHAVIOR* (arxiv 2610.18206) catalogued boundary violations in open-source coding agents, among them unintended modification of user inputs in 50.5 percent of cases and silent compromise of environment integrity in 53 percent. Its mitigation, CODE-KIT, combines guidelines with purpose-built tools, and the abstract reports 52 percent fewer misbehaviors for smolagents and 34 percent fewer for OpenHands, with better task completion. We read that as support for putting the boundary in the tool the agent calls and not only in the instructions it reads. The paper tested guidelines and tools together, not tools alone.

## Do

Set per-agent rate and spend caps, and enforce boundaries in the tools the agent calls, not only in its instructions.

## Don't

Grant unbounded autonomy by default.

## Artifact

```json
{
  "agent": "acme-support-bot",
  "limits": {
    "requests_per_min": 60,
    "max_spend_usd_per_day": 100,
    "max_actions_per_session": 200,
    "scopes": ["orders:read", "refunds:write"]
  }
}
```

## Citations

1. [OWASP LLM10:2025 (Unbounded Consumption)](https://genai.owasp.org/llmrisk/llm102025-unbounded-consumption/): Denial of Wallet (DoW): by initiating a high volume of operations, attackers exploit the cost-per-use model of cloud-based AI services, leading to unsustainable financial burdens on the provider
2. [Zuplo: Token-Based Rate Limiting for AI Agents](https://zuplo.com/learning-center/token-based-rate-limiting-ai-agents): Per-consumer token budgets make cost anomalies visible, and a token usage spike might indicate a runaway agent loop; the gateway layer is where token-based rate limiting, cost control, and AI-specific security converge
3. [OWASP MCP Top 10 (MCP02: Privilege Escalation via Scope Creep)](https://owasp.org/www-project-mcp-top-10/): Temporary or loosely defined permissions within MCP servers often expand over time, granting agents excessive capabilities
4. [Trong et al.: SWE-MISBEHAVIOR: Benchmarking and Mitigating Boundary Violations in Software Coding Agents (arxiv 2610.18206, v1, 2026-10-13)](https://arxiv.org/abs/2610.18206): Motivated by these findings, we further propose CODE-KIT, a lightweight adaptive framework that combines misbehavior-aware guidelines with novel tools to help agents avoid such failures. CODE-KIT reduces misbehaviors by 52% for smolagents and 34% for OpenHands, while simultaneously improving task completion performance.

---
Source: Agent Experience Principles (axprinciples.com)