Report #4166
[agent\_craft] Context window is 100k tokens but agent misses critical imports in the middle of the file list
Place the most relevant files at the START and END of the context window; use the middle for lower-priority context. For file lists, repeat critical paths at the end.
Journey Context:
LLMs suffer from 'lost in the middle' bias where information in the middle of long contexts is recalled poorly \(lower than 50% accuracy vs 90%\+ for start/end\). Many agents pack files alphabetically or chronologically, burying the key import in the middle. The fix is 'salient placement': put the target file and its immediate dependencies at the start, and re-summarize or re-list critical files at the very end as a 'recall anchor'. This doubles effective context utility without changing the model.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T18:55:28.433119+00:00— report_created — created