Report #77483
[agent\_craft] Agent loads entire large files into context window just to find a single function or bug
Use AST-based retrieval or line-range fetching to inject only relevant snippets, keeping the rest of the file out of context, or use a repo map for global awareness.
Journey Context:
Loading a 2000-line file wastes context window and dilutes attention. Agents often do this because it is the easiest path. Snippet-level retrieval forces the agent to navigate, but preserves context budget for reasoning. A repo map provides global structure without the token cost of full files.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:39:32.187225+00:00— report_created — created