Codex Desktop restart promotes queued follow-up ahead of incomplete active goal

Open 💬 2 comments Opened Jul 24, 2026 by cryptomasters
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

Codex Desktop 26.721.3996.0 (Microsoft Store/AppX, x64).

What subscription do you have?

Not included in this public report.

What platform is your computer?

Windows, x64.

What issue are you seeing?

After updating and restarting Codex Desktop while a long-running task was still incomplete, Codex resumed the same thread but promoted a queued follow-up task into the active run ahead of the unfinished task.

The original task had a persistent active goal and no completion event. On restart, goal-continuation context was restored correctly, but the queued follow-up was delivered in the same new run and the agent began planning that later task instead of continuing the active goal. The user had to correct the agent twice and explicitly restate that the queued task must run only after the unfinished task completes.

This is an ordering/arbitration failure between:

  1. recovery of an incomplete active goal after an app restart, and
  2. a follow-up that the user queued specifically for execution after the current task.

The queued message was not lost. It was promoted too early.

Observed timeline

Time zone: UTC+07:00.

  • 19:50:16: updated Codex Desktop process started.
  • 19:50:26: the same thread began a new task/run after restart.
  • The recovered turn contained both the still-active goal-continuation context and the later queued instruction.
  • The agent immediately started reconciling/planning the queued instruction.
  • Within about one minute, the user had to state that the previous task was not finished.
  • The user then had to explicitly restate that the queued task must not run until the previous task is fully complete.

Read-only local rollout metadata confirms that the original task had no terminal completion before the restart. The active goal was still present after restart. Exact task IDs, local paths, prompt content, business data, and logs are intentionally omitted from this public issue and can be supplied privately if maintainers need them.

What steps can reproduce the bug?

  1. Start a long-running Codex Desktop task that has a persistent active goal and is still doing tool work.
  2. While it is running, submit a separate follow-up using Queue, with the intent that it should run only after the active task finishes.
  3. Update or fully quit and restart Codex Desktop before the active task completes.
  4. Reopen/resume the same thread.
  5. Observe the first recovered run.
  6. In the failing case, Codex restores the incomplete goal but also delivers the queued follow-up as active input, and the agent starts the queued task before completing the original one.

What is the expected behavior?

  • An incomplete active goal should resume first after restart.
  • A queued follow-up should remain queued, in its original order, until the active goal reaches a terminal state.
  • Restart/recovery must not reinterpret Queue as Steer or as the primary instruction for the recovery run.
  • If recovery cannot determine the correct ordering, the UI should preserve both items and ask the user rather than silently promoting the later task.

Impact

This can derail long-running work, mutate the wrong plan, start external actions in the wrong order, and force the user to manually reconstruct task precedence after every restart/update.

Related but not exact duplicates

  • #32715 — queued follow-ups are lost after restart. Here the follow-up survives but runs too early.
  • #26413 — queued follow-ups remain persisted but stop processing. Here processing occurs, but before the incomplete active goal.
  • #34026 — stale completed/streaming UI state traps follow-ups. Here the goal is genuinely incomplete and recovery ordering is wrong.

No secrets, project content, account email, raw local paths, or full logs are included.

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 1 month ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #34933
  • #33853

Powered by Codex Action

cryptomasters · 1 month ago

Duplicate review

I reviewed both candidates suggested by the automated check. Neither is an exact duplicate of this restart/recovery ordering failure.

#34933

#34933 concerns a follow-up injected from another Codex task while the target task is still actively running. The ambiguity there is whether cross-task coordination should interrupt, steer, or queue the incoming message.

This report has a different trigger and state transition:

  • the follow-up was explicitly submitted with Queue in the same task;
  • Codex Desktop was updated/restarted before the active goal completed;
  • on recovery, the unfinished goal context and the queued follow-up were both restored into the same new run;
  • the later queued item was promoted ahead of the still-incomplete goal.

The restart/resume boundary and preservation of pre-restart queue precedence are central here and are not covered by #34933. A regression test for #34933 would exercise live cross-task injection; a regression test for this issue must persist an incomplete active goal plus a queued item, restart the app, and assert that recovery resumes the active goal before releasing the queue.

#33853

#33853 asks Codex to keep retrying the current task after a Selected model is at capacity error instead of advancing to the remaining queue. This report did not involve a model-capacity error or retry policy.

The shared theme is that queued work must not overtake unfinished work, but the required fixes are different:

  • #33853: error/retry policy must retain ownership of the current queue position;
  • this issue: restart hydration and task recovery must reconstruct the authoritative active-goal/queue ordering without promoting a later item.

Conclusion

No exact duplicate was found, so I am leaving #35174 open. The issues may share a lower-level scheduling/arbitration invariant, but this report contributes a distinct and independently testable restart-recovery failure. If maintainers later consolidate them, the restart persistence scenario and its regression coverage should be retained.