Windows Codex CLI loses terminal scrollback history after long responses
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- cli, operating-systems
Research direction
Start at the Codex CLI terminal/TUI rendering entry point and reproduce the issue with a response longer than one screen in VS Code's integrated terminal and Windows Terminal. Trace how long output is rendered and verify that completed responses remain in normal terminal scrollback on Windows 10 and 11.
Written by the indexing model from the issue text.
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.
- 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 ·