Report #14257
[agent\_craft] Agent reads entire large files into context causing overflow
Enforce a 'search first, read targeted' policy. The agent must use grep/ripgrep to locate line numbers, then read a specific line range \(e.g., sed -n '10,20p'\), rather than catting the whole file.
Journey Context:
Agents naturally want to 'read the file' like a human, but context windows are limited and attention is finite. Loading a 2000-line file pushes out other critical context \(like the original user request\) and dilutes attention. Targeted reading preserves 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-16T21:09:47.989932+00:00— report_created — created