So Long and Thanks for All the Context
AI-generated summary of reporting by Oreilly AI ML Blog. Read the original for the full story.
Why it matters
Engineers running long AI agent sessions lose information buried mid-context regardless of window size, and this piece offers concrete workarounds like curated briefs and edge-positioning of key data.
This article explains why AI chatbots sometimes ignore information placed in the middle of a long conversation, a problem researchers call the 'lost in the middle' or U-shape effect. Tests by Stanford's Nelson Liu showed models recall best what's at the start or end of their context. Research suggests it's built into the architecture itself, not fixable by training. The author shares five practical workarounds, like writing key details to files and starting fresh sessions.
Teams relying on AI coding agents should not assume bigger context windows (Gemini 3 claims strong single-needle recall at 1M tokens) make long sessions reliable. The U-shape attention bias appears to be structural, so middle-of-context instructions get ignored. The author recommends running many short sessions that read curated briefs from disk rather than one long session. Adopters of agentic engineering gain most; no vendor is named as having fixed the underlying issue.
The U-shaped position bias, primacy and recency preference with mid-context degradation, persists across model families and large windows. A 2025 ICML paper attributes it to equilibrium between causal-mask primacy and RoPE-driven recency; Chowdhury's 2026 paper proves the U-shape exists at random initialization, pre-training. Liu's 'Lost in the Middle' paper established the empirical pattern. Workarounds: externalize-recognize-rehydrate, curated context briefs, --append-system-prompt edge placement, short sessions reading from disk, and externalized state instead of in-context bookkeeping.
Read the original
This summary exists to save you time, not to replace the source.
Key terms
Quality Playbook BUGS.md Claude Code Gemini 1.5 Pro Gemini 3 Haiku 4.5 ICML
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
Code-driven AI illustrations are more useful than images from dedicated image models
Code-driven AI illustrations let designers edit assets directly in code, saving time on iteration and ensuring consistency, which is a game-changer for teams that need rapid, reusable visual content.
Speculative Decoding Makes Tool Calls Faster. Agents Need a Cache.
Speed improvements in speculative decoding mean agents can execute tool calls faster, reducing latency for real-time applications.
OpenGame: turn your local coding agent into a full-stack game studio
Developers with a local coding agent can now scaffold full playable 3D games, art, music, testing, publishing, instead of only refactoring code, opening a path from hobby coding to shippable mini-games.
Let Claude Code or any agent tap, type, and read your real phone
Agents can now close the mobile testing gap by driving and reading a real phone themselves, with nothing installed on the device.