Repository navigation
Description
What version of the Codex App are you using?
- Codex Windows app:
26.825.4187.0 - Codex CLI/app-server:
0.139.0
What platform is your computer?
Windows 11 x64, build 10.0.26200.9168.
What issue are you seeing?
When Codex itself executes an immediate Windows reboot from inside an active local turn, the host shuts down before the turn can emit its terminal event. After Windows and Codex restart, the task UI rehydrates from that orphaned turn instead of reconciling the later durable transcript.
Observed UI state after reopening the task:
- The visible timeline is truncated at the successful
shutdown.exe /r /t 0tool call. - The composer initially shows the Stop/Pause button as if the turn were still running.
- Typing any text changes the control to the normal Send arrow.
- Pressing Stop/Pause does not restore the missing messages. It only changes the displayed message cutoff/update time to the current time.
- Sending a new message can continue the task, but later messages already present in the local rollout remain absent from the UI/thread reconstruction.
The transcript data is not lost. The local rollout JSONL contains the missing assistant messages, tool calls, subsequent user turns, and later normally completed turns. The task list also has a much newer updatedAt than the last turn reconstructed by the UI.
This reproduced twice around Codex-driven Windows reboot validation.
What steps can reproduce the bug?
- Start a local Windows task in Codex Desktop.
- Keep the current assistant turn active.
- Approve a tool call that executes:
shutdown.exe /r /t 0 - Let Windows reboot and relaunch Codex.
- Open the same task.
- Observe that the timeline stops at the reboot command and the composer displays a stale Stop/Pause button.
- Type in the composer; the button changes to Send.
- Press Stop/Pause before typing, or send a continuation message.
- Observe that Stop only advances the cutoff/update timestamp and does not rehydrate later persisted transcript events.
Diagnostic evidence
For one captured occurrence, the rollout contains this sequence:
task_started- normal assistant messages and completed tool calls
- successful
CommandExecutionforshutdown.exe /r /t 0 - host reboot before a matching
task_completecould be persisted - after restart, a new user continuation and many later assistant/tool events were appended to the same rollout
- later turns include valid terminal events
However, the reopened task reader continues to expose the pre-reboot turn as:
- status:
interrupted completedAt: null- latest visible content ending at the reboot command
It omits the later authoritative rollout ordinals even though the task-level updatedAt reflects them.
No prompt contents, task UUIDs, usernames, local paths, repository names, commit hashes, credentials, or private source information are included in this report.
Expected behavior
Codex should safely handle an approved agent-initiated host reboot.
At minimum, after restart the app should:
- Detect that the pre-reboot process died while the turn was active and mark that turn interrupted without leaving a stale running control.
- Reconcile all later authoritative events in the durable rollout instead of allowing the orphaned turn/index entry to truncate the timeline.
- Make Stop/Pause either terminate a real active turn or clearly report that no backend turn is attached.
- Preserve Send/Stop state consistently with the actual backend turn.
- Consider guarding immediate host-shutdown commands, or schedule them only after the current turn has durably emitted its terminal state.
Related issue
Related to #39885, but the captured terminal condition differs:
- [Windows App] Completed response disappears after restart; turn rehydrates as interrupted #39885 has a persisted final assistant response and
task_complete, yet rehydrates as interrupted. - This report is triggered by Codex terminating its own Windows host mid-turn, leaving no matching
task_complete; later valid rollout events still exist but are hidden behind the orphaned turn.
Both cases may share stale-state precedence during thread reconstruction.
Activity
github-actions commentedon Aug 29, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action