Token budgeting — CCA-F Exam Prep
L2.26|Token budgeting
1/12
You're building a customer support agent. It works perfectly for 15 minutes.
Turn 1: 2,000 tokens. Turn 5: 14,000 tokens. Turn 10: 48,000 tokens. Turn 20: context_length_exceeded. The conversation crashes. The customer has to start over.
You never thought about how tokens accumulate. The system prompt is 3,000 tokens. Each tool definition adds 500. Each turn of history adds 2,000. Each tool result adds 1,500. It compounds.
You didn't have a token budget. So the context window became a credit card with no limit -- until the bank called.
