Report #24544
[agent\_craft] Critical source files in the middle of long context windows are ignored by the agent
Order context as: \[System\] → \[Tool schemas\] → \[Most recently edited files \(newest first\)\] → \[Less relevant files\]. Keep file count under 20 for 128k contexts, or use 'hierarchical summarization' \(parent files before children\).
Journey Context:
LLMs exhibit U-shaped attention: information at the start \(system prompt\) and end \(recent conversation\) is retained, while middle tokens are effectively dropped. For coding agents, this means files placed between system instructions and the user query are ignored. Front-loading recently modified files leverages the recency bias at the end of the context, while placing stable tool schemas at the front leverages primacy. Hierarchical summarization prevents burying critical parent class definitions under child implementation details.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:36:28.950138+00:00— report_created — created