Repository navigation
Description
What version of the Codex App are you using?
26.901.22334 (build 7746)
What subscription do you have?
Not included in this public report.
What platform is your computer?
macOS 26.6.2 arm64
What issue are you seeing?
After context compaction in a long-running Codex App thread with an active goal, a completed historical user request was presented to the model as the current actionable request. The model re-executed that old request, then the hidden goal continuation was injected again and the model resumed the active goal.
This appears closely related to:
- Compaction resume incorrectly presents stale latest user prompt as current active instruction #27731
- Codex App: Goal compaction resurrects completed manual steer before goal continuation resumes #29811
- Goals: active goal continuation prompt and audit requirements can be lost after mid-turn compaction #19910
The distinctive part of this reproduction is that the resurrected message was a completed plan-only request, while the active goal explicitly said that the plan had already been confirmed and execution should continue without replanning.
Observed control flow
The project and exact conversation text are anonymized, but the structure was:
-
An ordinary user message requested:
Investigate and produce a detailed plan only. Do not modify files. -
That planning request was completed.
-
A later active goal explicitly stated:
The detailed plan was confirmed. Persist the confirmed plan and execute it through real acceptance. Do not replan or ask whether to start. -
Codex continued implementing the goal and accumulated substantial implementation, test, and runtime context.
-
Context compaction occurred.
-
The resumed context surfaced the old ordinary plan-only request as if it were the current user request.
-
The model ignored the already-confirmed execution phase and generated a new plan again.
-
On the following continuation turn, the hidden active-goal context was injected again, and the model resumed implementation.
The visible behavior therefore looked like:
active goal is executing
→ compaction
→ completed historical "plan only" prompt becomes current
→ model replans
→ goal continuation is injected again
→ model resumes implementation
This was not a normal interpretation conflict. The old plan-only instruction had already been completed, and the active goal explicitly invalidated the earlier planning-stage instruction.
What steps can reproduce the bug?
-
Start a Codex App task with an ordinary request that has strong, recognizable constraints:
Produce a detailed implementation plan only. Do not modify files. -
Let Codex complete that request.
-
Start an active goal that explicitly advances to the next phase:
The plan is confirmed. Execute the confirmed plan through implementation and verification. Do not replan. -
Let the goal run for multiple turns and perform substantial implementation/testing work.
-
Allow automatic compaction to occur.
-
Inspect the first model action after compaction.
-
The stale plan-only request may be treated as newly submitted, causing the model to replan instead of continuing from the active goal checkpoint.
-
Let that turn finish. The next hidden goal continuation may then cause the model to resume execution, demonstrating that two different task pointers were restored at different times.
What is the expected behavior?
Compaction should preserve enough task lifecycle state to distinguish:
historical user request: completed
from:
current active goal: continue execution from latest checkpoint
A completed planning-stage prompt must not become the current instruction after compaction. The model should continue from the latest active goal checkpoint, or stop and report a state conflict if the current task cannot be determined reliably.
Why this matters
This can silently replace a confirmed plan with an unreviewed regenerated plan. In other cases, the resurrected instruction could involve destructive operations, external communication, data cleanup, rollback, or expensive verification.
The failure appears to be in compaction/task-state restoration rather than model reasoning alone:
- before compaction, the active goal correctly continued execution;
- immediately after compaction, the historical ordinary user message regained priority;
- after that repeated turn completed, goal continuation resumed again.
Suggested fix
-
Preserve the active goal checkpoint and current execution phase through compaction.
-
Mark ordinary user messages as completed after the corresponding task completes.
-
Do not place a completed historical message as the latest actionable user item in replacement history.
-
Include an explicit post-compaction boundary such as:
The last ordinary user request was completed. Current active work is the goal continuation at checkpoint X. Do not re-execute the historical request.
Additional information
Thread IDs, local repository paths, source code, credentials, and business data are intentionally omitted from this public report. A private in-app feedback report can provide the original thread identifier if needed.
Activity
github-actions commentedon Sep 4, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
RongNianXin commentedon Oct 26, 2026
Additional Windows Goal evidence: five post-compaction returns to completed preparation despite active-goal readback
This matches the completed plan-only request / active Goal alternation described in this issue. It also complements the earlier delegated-task observation at #42695 (comment). That earlier comment already documented a correct summary followed by stale-task recovery; this is not presented as a new discovery of that general pattern.
Environment and evidence limits
0.163.0-alpha.11.2; the exact running Desktop/app-server binary and effective retention features were not independently verified.Observed sequence
turn_trigger=goal. All five visible replacement histories retain the same older preparation-only user request. Neither those explicit lists nor their retained user-message lists contain the current Goal-continuation payload as a standalone item.status=active, but do not correct the selected phase. The recovered segments make 16, 14, 19, 15 and 14 tool calls before their real final responses. Those responses deliver preparation or another Goal text instead of the current execution result. Each is paired with a task-completion event; compaction-summary messages are excluded from this count.Thus an unchanged active Goal, a correct summary and nonzero tool activity can coexist with repeated replay of an already-completed preparation phase. Existing project recovery instructions also required current-event reconciliation; another reminder is not a verified product fix.
Requested investigation and regression coverage
Please inspect how the first resumed model request binds the current Goal trigger, execution checkpoint and completed preparation request. Visible replacement-history asymmetry is established here, but we did not capture the complete inference request and cannot attribute the defect uniquely to the host, model or provider. Goal continuation may use a different path from the delegated-tool-output retention discussed in the linked comment.
A useful regression would check:
Separately verify that a genuinely new preparation-only request, stop instruction, permission limit or expired budget is still honored. An active Goal must not override those boundaries. Please distinguish proven replay of a completed phase from legitimate research or bounded waiting; tool activity alone is not evidence of goal progress.
Related public reports reinforce the need for end-to-end coverage: the candidate discussed in #32922 considers both hidden Goal continuation and host-annotated user pause/clear input; it is not evidence of an official deployed fix. A recent report in #47592 (comment) describes correct context injection and successful current-assignment lookup followed by an off-task final answer. These are other reporters' observations, not reproductions performed here or proof of a shared cause. Retention tests should preserve message order, visibility and authority rather than promote retained tool input into new user approval.
Private session records are not attached.