Repository navigation
Windows Codex CLI loses terminal scrollback history after long responses #35335
Description
What version of Codex CLI is running?
codex-cli 0.145.0
What subscription do you have?
Plus
Which model were you using?
gpt-5.6sol
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What terminal emulator and version are you using (if applicable)?
VS Code
Codex doctor report
## Windows: Codex CLI loses terminal scrollback history after long responses
### Codex version
codex-cli 0.145.0
### Platform
- Windows 10 x64
- Windows 11 x64
### Terminal environment
Tested with:
- VS Code integrated terminal
- Windows Terminal
Terminal supports VT processing and truecolor output.
Installation method:
- npm
### Describe the bug
When Codex generates a long response, once the output exceeds the visible terminal height, previous content disappears permanently.
The terminal scrollback buffer does not contain the missing content. Scrolling up with the mouse wheel or terminal scrollbar cannot recover the previous output.
It looks like Codex CLI is rendering the conversation inside a fixed-height TUI region and discarding content outside that region.
Other CLI AI coding tools (for example Claude Code) do not have this issue in the same terminal environment. Their previous output remains available through normal terminal scrolling.
### Steps to reproduce
1. Install Codex CLI on Windows.
2. Start a conversation.
3. Ask Codex to generate a long response (for example a large code explanation, architecture design, or file diff).
4. Wait until the response exceeds one terminal screen height.
5. Try scrolling back.
### Expected behavior
The complete conversation history should remain available through terminal scrollback, like normal CLI applications.
### Actual behavior
Older output disappears after leaving the visible terminal area.
### Additional information
I tested this on both Windows 10 and Windows 11, and the issue reproduces consistently.
The terminal itself works correctly with other CLI applications, so this appears to be related to Codex CLI's TUI rendering behavior rather than terminal configuration.
### Possible improvement
Please consider providing a non-TUI output mode or a setting that preserves normal terminal scrollback behavior, similar to traditional CLI output.What issue are you seeing?
Codex CLI loses terminal scrollback history after long responses on Windows.
When Codex generates a response longer than the visible terminal area, previous output disappears permanently. Scrolling up with the terminal scrollbar or mouse wheel cannot recover the missing content.
It seems that Codex CLI renders output inside a fixed-height TUI area and discards content outside the visible region.
Environment:
- Codex CLI version: 0.145.0
- OS: Windows 10 x64 / Windows 11 x64
- Installation method: npm
- Terminal: VS Code integrated terminal and Windows Terminal
Other CLI AI coding tools such as Claude Code work correctly in the same terminal environment, where previous output remains available through normal terminal scrolling.
What steps can reproduce the bug?
- Install Codex CLI on Windows.
- Open Codex CLI in a terminal.
- Ask Codex to generate a long response, for example:
- a large code explanation
- architecture design
- a large file diff
- Wait until the response exceeds one terminal screen height.
- Try scrolling back using the terminal scrollbar or mouse wheel.
Actual result:
The previous output is missing and cannot be recovered from the terminal scrollback buffer.
This happens consistently on both Windows 10 and Windows 11.
No special code snippet is required to reproduce this issue. Any sufficiently long Codex response triggers it.
What is the expected behavior?
The complete Codex response should remain available in the terminal scrollback buffer.
Users should be able to scroll back and review previous output, similar to normal CLI applications.
Long responses should not disappear after leaving the visible terminal area.
Additional information
I tested this with multiple terminals:
- VS Code integrated terminal
- Windows Terminal
The terminal scrollback works normally with other CLI applications, so this does not appear to be a terminal configuration issue.
The issue seems related to Codex CLI's TUI rendering behavior on Windows.
A possible improvement would be providing a non-TUI output mode or an option to preserve normal terminal scrollback behavior.
Activity
zhouyinxuan9264 commentedon Aug 1, 2026
I can reproduce this on
codex-cli 0.146.0in Windows Terminal withPowerShell 7.6.3 on Windows 11 (
10.0.22621 x64).Importantly, the issue still reproduces when starting Codex with:
etraut-openai commentedon Oct 12, 2026
(response from codex)
Closing as likely addressed for normal CLI use in v0.162.1. The default fullscreen view now retains and scrolls transcript entries itself (#46721, #46733). If you are using inline/scrollback mode, related loss is still tracked at #27644; please report any new fullscreen reproduction.