Codex context compaction bug causes repetitive planning loops
GeYugong · ghdev · 2026-08-17
A developer reported a context compaction bug in OpenAI Codex that disrupts long-running agentic tasks.
Observed Behavior
- Context compaction preserves the content of a plan but loses its execution state.
- After compaction, completed actions are reintroduced as pending tasks, causing the agent to re-inspect the same areas repeatedly.
Root Cause
- The compaction summary collapses distinct states (user goal, constraints, confirmed findings, completed actions, pending actions) into a generic narrative.
- Phrases like “next I will inspect X” from the old plan are interpreted as fresh instructions.
Impact
- Wastes tokens and context window.
- Breaks the continuity of autonomous coding workflows.
More from coding & agent
- Meta open-sources Muse Spark Open agent model with day-0 TPU support in SGLang — BanghuaZ · 2026-10-16
- Saying "load-bearing" in your prompt makes Opus 5.5 stop holding back — zacharynado · 2026-10-16
- You.com partners with Paperclip to give every agent live web access — PolarBearby · 2026-10-16
- I priced every Grok Bot call: $20 to $200 plan in 5 days, long jobs eat 52% — jonathanmalkin · 2026-10-16
- GitHub is criminally underrated as a free data store, devs argue — blelbach · 2026-10-16
- Claude Desktop doesn't support MCP sampling — here's a workaround for two-way MCP apps — wuj · 2026-10-16