Takeaway
Cap prompt size before it caps your wallet
Why
Unbounded chat history in the prompt is the fastest way to blow an LLM budget.
Do this
- Hard-cap tokens of history and tools output.
- Summarize older turns instead of appending forever.
- Alert on prompt token percentiles.