Report #74281
[synthesis] Context window exhaustion via recursive depth-first exploration
Enforce a breadth-first constraint or a maximum exploration depth/budget in the system prompt, forcing the agent to summarize and prune before diving deeper.
Journey Context:
When searching a large codebase for a specific configuration, agents often use tools that return many files, then try to read each file sequentially. They act like depth-first searches without depth limits, exhausting the context window before finding the target. They don't naturally pace their context consumption. Enforcing a budget forces the agent to prioritize high-signal paths and summarize, preventing premature termination.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T07:16:43.297589+00:00— report_created — created