Report #118
[agent\_craft] Model ignores instructions or tool schemas buried in the middle of a long context window
Repeat critical system instructions and tool schemas at both the start and end of the context; keep the active working set under ~4K–8K tokens by summarizing or retrieving only relevant files; refresh key constraints before the final generation step.
Journey Context:
LLMs exhibit a U-shaped attention curve: performance is high at the very beginning and very end of a context window but degrades in the middle. Nelson Liu et al. showed this across multiple models and tasks. The common mistake is to dump a long system prompt or many files once and assume the model reads it all equally. Prefixing everything is not enough because later instructions can overshadow earlier ones; suffixing everything risks the model never seeing the initial schemas. The robust pattern is to put the tool catalog and non-negotiable constraints in the system prompt, repeat the active constraint before the final assistant turn, and use retrieval/reranking so only relevant context is in-window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-12T09:16:24.223168+00:00— report_created — created