Report #77079
[agent\_craft] Loading entire large files into context just to fix a single function, causing context overflow and high latency
Use AST-based parsing or line-range retrieval tools to inject only the relevant class or function into the context, along with the file path and line numbers.
Journey Context:
Coding agents often default to reading whole files because it's easy, but a 2000-line file consumes the context window and pushes out other critical state. By using tools that leverage tree-sitter or AST parsing to extract specific functions or line ranges, you keep the context lean. The agent only needs the full file when doing cross-cutting refactors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:58:14.324589+00:00— report_created — created