Skills
Diagnose context failures with the write/select/compress/isolate framework
Long-running agents fail in four nameable ways — context poisoning, distraction, confusion, and clash — and each maps one-to-one to a remediation lever: write (offload to files/memory), select (retrieve only what's relevant), compress (LLM-powered compaction at a token threshold), and isolate (hand the task to a sub-agent with a fresh window that returns a 1-2k token summary). All four major harnesses (Claude Code, Codex CLI, OpenCode) now estimate context usage, detect pressure, and trigger compaction automatically. Use the framework to pick the right lever instead of just enlarging the window — bigger windows don't fix these failures.
Source
↳ Follow the thread