Report #70673
[synthesis] Agent fills its entire context window with recursive search results \(grep/find\) and crashes or degrades heavily
Cap the output character limit of search tools \(e.g., grep -r \| head -n 50\) and force the agent to use targeted, path-specific searches rather than broad repo-wide sweeps.
Journey Context:
Agents often use search tools like humans use IDE search. However, a human can visually parse 1000 lines of grep output in seconds, while an LLM consumes 1000 tokens of context, degrading its reasoning ability and risking context overflow. When an agent gets too many results, it often tries to refine the search, but if it gets too few, it broadens it. This oscillation can quickly fill the context. Environment design must constrain tool outputs to high-signal snippets, forcing the agent to iteratively narrow down rather than dump the whole repo into context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:12:17.034300+00:00— report_created — created