Zellij switch-away leaves Codex TUI on a stale viewport while the turn completes in the rollout
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the local Codex TUI workflow in Zellij and compare the visible conversation with the persisted rollout JSONL and Zellij dump-screen --full output. A useful result would identify a deterministic trigger and ensure that returning to the view redraws the latest completed turn rather than restoring the stale viewport.
Written by the indexing model from the issue text.
Description
What version of Codex CLI is running?
codex-cli 0.146.0 (the latest stable version reported by the built-in update check at the time of the incident)
What subscription do you have?
ChatGPT Pro ($200/month, 20x limits)
Which model were you using?
gpt-5.6-sol, reasoning effort xhigh
What platform is your computer?
Host: Windows 10 Enterprise 22H2, build 19045.6456
Linux 6.18.33.2-microsoft-standard-WSL2 x86_64 x86_64
Ubuntu 22.04.5 LTS under WSL2
What terminal emulator and version are you using (if applicable)?
Windows Terminal 1.24.11911.0 → WSL2 → Zellij 0.44.3
Zellij binary: /usr/local/bin/zellij. zellij setup --check reports that the active config is well defined.
Codex doctor report
The following is a manually reduced, public-safe subset of codex doctor --json. The full output contains local filesystem paths and unrelated historical thread records, so it has not been included in this review draft.
{
"schemaVersion": 1,
"overallStatus": "warning",
"codexVersion": "0.146.0",
"relevantChecks": {
"config.load": {
"status": "ok",
"model": "gpt-5.6-sol"
},
"installation": {
"status": "ok",
"installMethod": "npm",
"platform": "linux-x86_64"
},
"network.websocket_reachability": {
"status": "ok",
"summary": "Responses WebSocket handshake succeeded"
},
"terminal.env": {
"status": "ok",
"terminal": "Windows Terminal",
"multiplexer": "zellij 0.44.3"
},
"updates.status": {
"status": "ok",
"latestVersion": "0.146.0",
"currentVersionIsLatest": true
}
},
"redactionNote": "Local paths and unrelated historical thread records omitted. The overall warning came from unrelated stale archived-thread database rows."
}
What issue are you seeing?
In a long-running local Codex TUI inside Zellij, I submitted a new prompt and saw the UI enter Working. After switching away from the affected Zellij view and returning, Codex displayed an older point in the conversation instead of the latest turn. The newly submitted user message and its result were both absent from the visible TUI.
This appeared to be data loss, but inspection of the local rollout JSONL showed that the user message was persisted and the turn continued through task_complete. The issue therefore appears to be a stale TUI viewport or replay/reconciliation problem rather than loss of the underlying conversation.
Detaching and reattaching to the same Zellij session did not repair the display. Zellij's scroll-to-bottom action also did not reveal the missing turn. The same older screen was restored.
There was no visible error message. The Codex process remained alive.
What steps can reproduce the bug?
I have one confirmed incident, not yet a minimal deterministic reproduction.
- Start Codex CLI normally inside a Zellij session. Do not use
--remote. - Continue using the same Codex and Zellij session for a long period with a sizable transcript.
- Submit a new prompt and observe the Codex status change to
Working. - Switch away from the affected Zellij tab/pane/session while the turn is active, then return.
- Observe that the TUI is showing an older point in the conversation. The latest user prompt and subsequent assistant result are not visible.
- Detach with
Ctrl+o,d, then reattach withzellij attach -c <session>. - Observe that the same stale viewport is restored. Scrolling to the bottom does not expose the latest turn.
- Inspect the rollout JSONL separately. The missing prompt and the completed turn are present there.
Thread ID: intentionally omitted from the public draft. I can provide it privately or add it after reviewing the privacy implications.
What is the expected behavior?
Returning to the Zellij view, or detaching and reattaching, should redraw Codex at the current conversation state. At minimum, scrolling to the bottom should reveal the latest submitted prompt, live progress, and final response.
The visible TUI should not remain on an older snapshot when the authoritative rollout has already persisted and completed a newer turn.
Additional information
- Codex was running locally; this was not a
codex --remoteconnection. - The Windows host was Windows 10 Enterprise 22H2, build
19045.6456, using Windows Terminal1.24.11911.0. I have not yet reproduced the exact incident under a second terminal emulator, so Windows Terminal/ConPTY cannot be completely excluded as a trigger. - I have also observed the same stale/missing-current-turn symptom on a separate home computer running Windows 11 + Windows Terminal + WSL2 + Zellij. Exact Codex, Zellij, WSL, and Windows Terminal versions were not captured for that occurrence. This makes a Windows 10-specific cause unlikely, but Windows Terminal remains a common variable. This is supporting observation rather than a controlled reproduction.
- No
tui.alternate_screenoverride is set. The effective documented default isauto, which skips alternate-screen mode in Zellij to preserve scrollback. - The affected Zellij session was approximately 25 hours old.
- The affected pane had approximately 4,372 scrollback lines, and the rollout file was approximately 1.7 MB.
- A normal-output control pane in Zellij retained hundreds of lines correctly, so Zellij's basic scrollback storage was functioning.
- Zellij's own
dump-screen --fulloutput also ended at the stale Codex view and did not contain the latest persisted turn. This makes a Windows Terminal rendering-only failure unlikely, although it does not rule out a terminal focus/resize event as the trigger. - Zellij scroll-to-bottom did not change the stale Codex view.
- Sending a terminal resize signal did not visibly redraw the current conversation.
Persisted event metadata for the missing turn (2026-08-04 UTC; message contents omitted):
| Time | Persisted event |
|---|---|
08:47:58.788 |
task_started |
08:47:58.831 |
user message persisted |
08:48:08.232 |
assistant commentary persisted |
08:48:16.045 |
tool call completed |
08:48:20.509 |
tool result persisted |
08:48:32.509 |
final assistant message persisted |
08:48:33.006 |
task_complete |
Potentially related issues, but none appears to cover this exact local-CLI failure mode:
- #2558 — Codex client output truncated when scrolling in Zellij concerns truncated scrollback.
- #10331 — Zellij scrollback still broken with
--no-alt-screenconcerns full-screen redraw in the main buffer. - #18860 — Remote TUI can remain stale after app-server slow-websocket disconnect is similar in symptom, but it concerns a remote app-server connection; this incident used the local CLI.
- #15001 — Subagent TUI corrupts live message text while raw rollout is correct also has a correct raw rollout, but this incident occurred in the primary local TUI rather than a subagent view.
I am not asserting a root cause. The combination of a completed rollout, an alive Codex process, functioning ordinary Zellij scrollback, and a viewport that survives detach/reattach suggests a Codex TUI render/replay/reconciliation issue.
The related Zellij/scrollback class is not Windows-specific: #2558 was reported on macOS, and #10331 was reported on native Linux with Ghostty. Those reports are not the same missing-current-turn symptom, so they do not prove that this exact incident is cross-platform. However, my separate Windows 11 + WSL2 + Zellij observation does indicate that the exact symptom is not limited to this Windows 10 host.
Raw transcript and terminal captures are not attached because they contain user prompts, local paths, and a signed CDN URL. I can provide narrowly redacted artifacts if maintainers identify the specific metadata needed.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·