Fixing Claude Opus 5.5 long-context drift with an external SESSION_STATE.md protocol
dr_cintas · x · 2026-09-28
The author found Claude Opus 5.5 breaks down when running freely across a 200k context window on complex features: context fills up, the model forgets earlier tool outputs, and produces hallucinated file states or circular diffs.
The fix is an "Agent Experience" external state protocol: force the model to maintain a SESSIONSTATE.md file before touching any code, with copy-paste instructions for CLAUDE.md:
- The file has five fixed sections: Objective (target behavior and acceptance criteria), Active Diffs, Decided Architecture (hard choices that must not be reopened), Verification Gates, and Handoff Note (next single command).
- Execution loop rules: generate the file from the prompt if missing; gates cannot be checked off without raw terminal output.
This moves working memory to disk, keeps the 200k window clean for reasoning, prevents premature completion claims, and lets compacted or sub-agent runs resume instantly by reading the file instead of the full repo.
Related event: Claude Opus 5.5 Loses Track in Long Contexts; SESSION_STATE.md Offers a Fix(2 posts)→
More from coding & agent
- Baseten's Guide: Evaluate Open Models for Coding Agents on Your Own PRs — baseten · 2026-11-16
- Google Research open-sources PaperOrchestra, a multi-agent framework for writing AI papers — google-research · 2026-11-16
- ffmpeg-skill gives coding agents local video editing via 42 FFmpeg tools and MCP — kajisho5 · 2026-11-16
- Agents Now Reply to Slack Messages on Their Own, Resolving a Prod Incident Ghost-to-Ghost — iamrobotbear · 2026-11-16
- Engineer's Interview Prep Method: Use Claude to Find Which Answers Undersell Your AI Work — brandon_galang · 2026-11-16
- DeepSeek open-sources its app frontend "chat-demo", already at 3.9k stars — NielsRogge · 2026-11-16