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
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: An agent bot that installs and drives Codex on its own (Melvin Vivas on X · notes), Asking a Coder bot to install Codex (Melvin Vivas on X · notes), Sign in with ChatGPT: Setting Usage Limits for Each App (Melvin Vivas on X · notes), Codex Cloud Environments Must Be Saved & Published Before Use (Melvin Vivas on X · notes) and 240 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