Report #49896
[agent\_craft] Agent gets confused when entire large files are loaded into context for a small edit
Retrieve outlines or skeletons first \(function signatures, class definitions\), then fetch specific implementations only when the agent decides to edit or analyze them.
Journey Context:
Dumping a 2000-line file into context dilutes the agent's attention and wastes tokens. A hierarchical retrieval approach \(outline -> chunk\) mimics how human developers navigate code \(looking at the file structure, then diving into a function\). This keeps the context window focused on the immediate task.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T14:14:18.648758+00:00— report_created — created