[macOS][CLI 0.146.0] TUI silently exits right after final agent-message consolidation — 5 sessions lost in one night
What version of Codex CLI is running?
codex-cli 0.146.0, standalone install channel (~/.codex/packages/standalone, current symlink). Auto-updated from 0.145.0 on 2026-07-29 14:27 KST. All crashes below occurred on 0.146.0.
What subscription do you have?
ChatGPT sign-in (Logged in using ChatGPT).
Which model were you using?
gpt-5.6-sol with xhigh reasoning effort.
What platform is your computer?
macOS 26.5.2 (build 25F84), Apple M4 Pro (arm64). GUI xterm-compatible terminal. TuiAppServer feature active (shared app-server).
What issue are you seeing?
During long-running interactive/autonomous work, the Codex TUI silently exits at the exact moment the final agent message of a turn finishes rendering. The TUI vanishes, the shell prompt returns, and there is:
- no panic message, no error output,
- no macOS crash report (
~/Library/Logs/DiagnosticReportshas no codex.ips), - no evidence of an external signal (checked launchd jobs and local cleanup scripts),
- a complete rollout
.jsonl(the session is resumable withcodex resume).
Five TUI processes died this way in a single night (2026-07-30 KST):
| TUI pid | last log (KST) |
|---|---|
| 84075 | 00:45:59 |
| 84959 | 00:57:51 |
| 20657 | 02:40:13 |
| 52878 | 02:58:15 |
| 57154 | 03:00:38 |
For all five processes, the final rows in ~/.codex/logs_2.sqlite are the agent-message consolidation of the just-finished turn, then nothing:
=== pid 57154 ===
03:00:38 DEBUG codex_tui::app::agent_message_consolidation ConsolidateAgentMessage: replacing cells [66..67] with AgentMarkdownCell
03:00:38 DEBUG codex_tui::app::agent_message_consolidation ConsolidateAgentMessage: transcript_cells.len()=67, source_len=253
03:00:37 TRACE codex_tui::markdown_stream push_delta: "." <- last characters of the final answer
=== pid 52878 ===
02:58:15 DEBUG codex_tui::app::agent_message_consolidation ConsolidateAgentMessage: replacing cells [41..44] with AgentMarkdownCell
02:58:15 DEBUG codex_tui::app::agent_message_consolidation ConsolidateAgentMessage: transcript_cells.len()=44, source_len=840
=== pid 84075 ===
00:45:59 DEBUG codex_tui::app::agent_message_consolidation ConsolidateAgentMessage: replacing cells [213..227] with AgentMarkdownCell
00:45:59 DEBUG codex_tui::app::agent_message_consolidation ConsolidateAgentMessage: transcript_cells.len()=227, source_len=759
The on-screen text right before one exit matched the last push_delta fragments in the log exactly — the model finished its answer, consolidation ran, and the process was gone.
Additional observations:
- In at least one session the exit came right after a
Context compactedmarker appeared in the transcript, which matches the symptom in #32974 / #31930 — this report narrows the exit point toConsolidateAgentMessageimmediately after turn completion. - The shared app-server process (0.145.0) survived while TUI clients died, and kept serving later sessions.
- Sessions earlier in the day on the same machine completed many turns (and many consolidations) fine before dying, so the crash is intermittent, not per-message.
Impact
Five interrupted sessions in one night of unattended/overnight work. Each exit kills the interactive context mid-task; before discovering codex resume we were re-seeding context manually. This is extremely disruptive for long autonomous runs — it currently cannot be trusted to run a multi-hour task without a human watching the terminal.
Happy to provide further sanitized log excerpts or run a diagnostic build if that helps.
Related: #32974, #31930.