TUI 0.145.0: completed response appeared in a different GNOME Terminal window while rollouts stayed isolated
What version of Codex CLI is running?
codex-cli 0.145.0
What platform and terminal are you using?
- Ubuntu 24.04.4 LTS, Linux 6.17 x86_64
- GNOME Terminal / VTE 7600
TERM=xterm-256color,COLORTERM=truecolor- Several independent Codex TUI processes open in separate GNOME Terminal screens
What issue are you seeing?
A completed response from one long-running Codex TUI appeared in another terminal window that was being used for a different concurrent task. The visible response was a Xenon evaluation summary (beginning with “v0.7.3 real evaluation completed” and then discussing XENON_CREDENTIALS_PATH).
This initially looked like a cross-session context leak. Local forensic inspection narrows it down substantially: the response and its task_complete event were persisted only in the owning Xenon thread, while the other concurrent rollouts did not contain that text. The suspected defect is therefore in TUI/terminal output ownership, replay, or repaint routing rather than model context construction.
The event is not explained by the normal completion-notification preview on this setup. Codex detects GNOME/VTE as unsupported for OSC 9 and selects the BEL backend; BelBackend::notify discards the message body and emits only \x07. The full response text therefore should not be able to appear in another terminal as an ordinary Codex desktop notification.
Local forensic evidence
All timestamps below are UTC on 2026-07-27.
- Owning thread:
019fa164-c491-7032-a1ea-5862c708575b - Owning process UUID:
pid:2548877:e09e616f-523a-4bd4-9c07-bf0966fcd27a - Owning GNOME Terminal screen:
/org/gnome/Terminal/screen/9dfbcc97_184c_43b0_9bcf_0e0419cce111 - The response streamed from
04:56:12through04:56:17. - Its rollout contains the matching
agent_message, response item, andtask_completeat04:56:17. - SQLite TUI trace rows for every delta are associated only with process
2548877. - A concurrently active TUI had thread
019fa168-8f20-7db3-ae53-54e36eeccd53, process2549631, and a different GNOME Terminal screen (b3090aeb...). Its rollout does not contain the Xenon response text. - Another independent thread was created shortly afterward as
019fa1f0-e398-7ab1-88e8-3ed02ad0cbad, process2598347, screenc0ce2e5e.... Its first user message is the pasted response plus the report of the apparent cross-window leak; it did not receive the response as model history. ~/.codex/goals_1.sqlitecontained no active goals or continuations when inspected.- No external
notifycommand or explicit TUI notification override was configured.
This is evidence against inference-context contamination, but it does not explain how the owning TUI's rendered response became visible in the wrong terminal window.
Steps that led to the observation
The behavior has not yet been reproduced deterministically.
- Open multiple GNOME Terminal tabs/windows.
- Start an independent
codexTUI in each one, from the same home-directory cwd but for different long-running tasks. - Let one TUI stream a long final response while working in another TUI.
- Observe the first task's completion text/status appearing in the other terminal window.
The affected run used a long-lived thread with many streamed/tool events, while other Codex TUIs were active concurrently.
Expected behavior
Each independent TUI process and terminal screen should render only the app-server events for the thread(s) owned by that TUI. Output from another OS process must never be painted into the current terminal, even during completion consolidation, replay, focus changes, or inline viewport redraw.
Actual behavior
The user observed another task's completed response/status in the wrong terminal window. Durable rollouts remained isolated, so the apparent leak was visible-output-level rather than persisted conversation history.
Why this is worth investigating
Even if no model context or credentials crossed the boundary, wrong-terminal rendering is security-relevant because a response can contain source code, paths, or secret-adjacent operational details. It can also cause the user to act on the wrong task status.
Potential areas to instrument or audit:
- PTY/stdout ownership around TUI teardown and redraw
- inline viewport / alternate-screen restoration
- completion consolidation and pending redraws
- app-server event routing and replay ownership
- whether the shared GNOME Terminal service can expose a screen-targeting edge case
Possibly related but not identical:
- #30714 (cross-session/stale TUI after interrupt, Windows)
- #30767 (stale final-response ownership within a turn transition)
- #15027 (cross-session
/reviewleakage)
This report differs because the persisted rollouts and process UUIDs remain cleanly separated, there was no /review, and the observation occurred across distinct Linux GNOME Terminal screens.