Codex CLI TUI truncates live assistant output while resume/session may contain the complete response

Open 💬 2 comments Opened Jul 12, 2026 by jackyyue

Summary

In interactive Codex CLI, the live TUI sometimes shows an assistant response as incomplete: the visible output stops before the required final marker [[END_OF_ANSWER]].

This appears related to live TUI rendering or message finalization rather than model/provider output, because some affected conversations later appear complete after codex resume or session reload.

Additionally, /copy may copy the previous completed assistant message instead of the currently visible truncated response.

Environment

  • OS: Windows
  • Codex CLI: codex-cli 0.144.1
  • Node: v22.22.0
  • PowerShell: 7.6.3
  • Terminal tested: Windows Terminal / standalone PowerShell
  • Codex installed via Node/npm shim

Reproduction Prompt

Please output 80 numbered Chinese conclusions, each 40-80 Chinese characters.
Do not write files. Do not call tools.
The final standalone line must be:
[[END_OF_ANSWER]]

Observed

  • Live Codex CLI output can stop before [[END_OF_ANSWER]].
  • codex --no-alt-screen still reproduced the issue.
  • Windows Terminal / standalone PowerShell still reproduced the issue.
  • Raw output mode still reproduced the issue.
  • /copy copied the previous assistant response, not the currently visible truncated response.
  • The issue happened even when there was still plenty of context left.

Expected

  • The live TUI should display the complete assistant response once the turn finishes.
  • /copy should copy the latest visible/current assistant response, or clearly indicate that the current response was not finalized.
  • If the response is already saved in the session, the live TUI should not stop early without showing the completed output.

Already ruled out

  • Not just VS Code integrated terminal.
  • Not fixed by --no-alt-screen.
  • Not fixed by raw output mode.
  • Not caused by a local image-paste helper script.
  • Not obviously caused by context exhaustion.

Screenshots

I have redacted screenshots showing:

  1. Raw output mode enabled.
  2. Raw output mode still missing the final marker.
  3. /copy copying the previous completed message instead of the current visible response.
  4. Windows Terminal / standalone PowerShell still reproducing the issue.

Local paths, user names, provider labels, and status lines were redacted before sharing. I can provide the redacted screenshots if helpful.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗