Report #10567
[agent\_craft] Agent reads entire directory trees or cats large files to understand the codebase, instantly consuming the context window
Enforce lazy loading. The agent must use targeted search tools like grep or semantic search rather than recursive directory listings. Limit file read outputs to a maximum window and require offset or limit parameters for further reading.
Journey Context:
Agents default to human-like exploration, reading from top to bottom, but LLM context windows are a scarce resource. Scanning a whole file is a massive token waste if the bug is on a specific line. Forced pagination and search-first strategies optimize the context budget for actual reasoning.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:08:07.674500+00:00— report_created — created