Report #86564
[cost\_intel] Unbounded context window growth in agentic coding loops leading to exponential cost increases
Implement a summarization step or sliding window after 3-4 tool calls, or use a manager-worker pattern where workers have short contexts.
Journey Context:
An agent reading 5 files and running bash commands quickly hits 50k\+ tokens. At GPT-4o prices, a single multi-step agent run can cost $1.00\+. Summarizing tool outputs and keeping only the last 2 turns drops cost by 80% and prevents small model degradation in deep contexts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:53:18.459240+00:00— report_created — created