# AIP011 — excessive-tokens
**Category:** efficiency **Severity:** warning
## What
Detects prompts that exceed a configurable token budget, which may increase latency or cost.
## Why it matters
Excessively long prompts consume more tokens and API quota. In production systems, this directly impacts cost and response time. Define a reasonable budget and keep prompts within it.
## Example
```
You are a customer support agent...
[10,000 tokens of instructions]
[10,000 tokens of examples]
[10,000 tokens of context]
```
At 30,000 tokens, this prompt alone dominates the request budget.
## Fix
Reduce the prompt or increase the budget:
- Extract repetitive examples into a few representative ones.
- Move static context into a system message or knowledge base.
- Use prompt compression or summarization.
## Configuration
Set `max_tokens_budget` in `.aiproofrc`:
```yaml
max_tokens_budget: 4000
```
Default is unlimited (no check).