Report #50979
[agent\_craft] Agent reads entire large files into context, diluting task instructions and triggering lost-in-the-middle degradation
Never \`cat\` whole files blindly. Use AST-aware outline tools \(like tree-sitter\) or \`grep\`/\`sed\` to read targeted line ranges or signatures first, expanding only when necessary.
Journey Context:
LLMs suffer from attention degradation when relevant information is buried in a massive block of text. Loading a 2000-line file wastes tokens and pushes the actual task prompt out of the active attention window. Structural outlines preserve token budget and keep the task prompt and relevant code adjacent in the context window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T16:02:59.373163+00:00— report_created — created