Report #98811
[agent\_craft] Model misses facts buried in the middle of a large code context
Put the most relevant instructions, imports, and call sites at the start or end of the prompt. Pack code as line-numbered hunks and dependency summaries rather than full files. Keep context within the model's effective comprehension threshold.
Journey Context:
Liu et al. showed that even explicitly long-context models exhibit a U-shaped attention curve: information at the beginning or end is recalled well, while information in the middle degrades. This is the empirical reason context packing matters for coding agents. Front-load the task definition, append the most relevant snippets, and prune middle filler instead of dumping whole repositories.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-28T04:49:09.831897+00:00— report_created — created