After automatic context compaction, Codex often continues using only the preserved agent instructions and appears to lose the actual state of the ongoing work.
However, the underlying information does not seem to be completely unavailable. If I explicitly ask Codex to review the previous work again before continuing, it can inspect the relevant files and history, reconstruct the task state, and resume correctly.
Observed behavior
- Work on a long-running implementation task.
- Automatic context compaction occurs.
- Codex resumes primarily from the preserved agent instructions.
- Completed work, decisions, current implementation state, and remaining tasks are not reflected correctly.
- Codex may repeat work or continue from an incorrect assumption.
- Ask Codex to review the previous work and current files again.
- Codex then reconstructs the state correctly and can continue.
Expected behavior
After compaction, Codex should automatically perform a task-state recovery pass before taking further action. This should include reviewing:
- the current repository state and changed files
- completed work
- important decisions and constraints
- unresolved issues
- the next intended action
The problem may not be complete context loss. It appears that the post-compaction agent does not automatically retrieve and reconcile the available execution state.