Codex Losing Task Context After Compaction
Melvin Vivas · X post · 2026-09-11 · Open on X
Topics: Prompt & Context Engineering, AI Dev Tools & Productivity · Level: intermediate
Summary
Melvin Vivas reports that Codex forgot what he had asked it to do after context compaction. He wonders whether an experimental context-management setting is the cause, which is a reminder that compaction can drop task instructions.
Key points
- Context compaction in coding agents can drop the original task instructions.
- Suspected cause: the experimental context-management config
[features.context_management] experimental_mode = true. - If an agent loses track after compaction, try turning experimental context settings off or restating the task.
Resources mentioned
- OpenAI Codex · tool · openai.com · paid · recommended by both Bashiri Smith & Melvin Vivas
OpenAI's coding agent. In the diagram it writes code, fixes review findings and drives the build loop. The creator also used it to make this video.
Also in: Developers moving from ChatGPT/Codex to Claude (Melvin Vivas on X · notes), Creator Opinion: Codex Is Still the Best at Computer Use (Melvin Vivas on X · notes), OpenAI Codex Ambassador applications are open (Melvin Vivas on X · notes), GPT-Live-1.1: Multilingual Voice Update for ChatGPT and Codex (Melvin Vivas on X · notes) and 264 more
More in Prompt & Context Engineering
- Jev on OpenRouter: Typed Decisions Instead of Generated Text
- How to Prompt GPT-6 Astra in Codex: Simpler Instructions, Leaner AGENTS.md
- OpenAI Guide: Rethinking Skills and Prompts for GPT-6 Astra
- Codex + GPT-6 Astra: Persistent Notes to Keep Context Across Windows
- MiniMax H3 Official Video Prompt Writing Guide
- Context Management in Coding Agents: /compact vs /clear vs /handoff