Agent loops produce quadratic input-token growth: because each step reprocesses the accumulated history plus new instructions/observations, token processing scales with the square of history length rather than linearly. The effect is large in practice — OpenHands coding sessions averaged 77,922 tokens across 1,500 sessions.
Context management is not a polish step but a first-order driver of agent cost and latency; without caching, compaction, or sparse attention, long-running agents become economically unviable at realistic session lengths.
Any iterative system that resends a growing state to a fixed-cost-per-token processor inherits quadratic work; the mitigation must live in the runtime (cache/compaction), not in the prompt text.
Agent input token usage scales quadratically based on linear history growth.
OpenHands coding agent sessions averaging 77,922 tokens per session across 1,500 sessions.
Agents require efficient context management strategies like caching, compaction, or sparse attention to remain economically viable.