You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Output width remains truncated after resizing Codex CLI window back to full size #5576
When the Codex CLI is producing output and I resize the terminal window to a smaller (half) width, the new output lines wrap to fit the reduced width. However, when I resize the window back to the original/full width while Codex is still outputting, the subsequent output remains constrained to the smaller width. It does not expand to fill the full width of the terminal, so the text continues to wrap at the narrower width even though the window has been restored.
What steps can reproduce the bug?
Launch the Codex CLI and start a task that prints multiple lines of output continuously.
While the CLI is outputting content, resize the terminal or window to approximately half of its original width.
Notice that the new output lines adjust to the smaller width as expected.
Without stopping the task, resize the terminal back to its original or a wider width.
Observe that the subsequent output still uses the narrower width, even though the window has been resized back to full size.
What is the expected behavior?
After resizing the window back to its original or larger width, the Codex CLI should adjust the output to the new width. New lines of output should wrap according to the current window size, so they use the full available width rather than remaining restricted to the narrower width used during the temporary resize.
Additional information
No response
Reacted by Paul Berg, mert-kurttutan, Adrián Molina, tomer-ben-david, felixmin, Luccas Correa, kyh9052, Max Katz, failable, geekerzhou and 9 more
I can reproduce this reliably in Ghostty. The issue is not limited to width changes:
Setup a vertical split. Run codex in one of the splits and load some content that fills scrollback.
Expand the pane using focus mode (in ghostty that is cmd-shift-enter) so it becomes full-height
The height of the rendered codex UI does not change even though the enclosing terminal has changed. Scrolling works, but if you type anything in the message bar, codex resets scroll position so message field is mid-terminal (because it's still rendering it as if it's half-height).
Some more data:
The PTY size is correct when Codex is this stale state.
Example from a live repro:
stty -f /dev/ttys023 size
63 206
- I monitored the TTY during focus enter/exit and the kernel winsize changed correctly when toggling focus mode:
30 102
63 206
30 102
63 206
30 102
- In the embedding host, the terminal surface also resized correctly at the same time.
- Manually sending SIGWINCH to the affected foreground process group did not fix the stale rendering.
This makes features like focus mode (or any feature that requires changing the size of a codex terminal) frustrating to work with.
I found a workaround. It’s annoying, but it consistently works for me:
Switch to another agent, then switch back. Codex appears to always have at least one background agent running, and changing agents seems to force a redraw. It is the only way I can get codex to redraw without exit+resume.
SometimesCtrl-l will fix it, maybe.
I’ve seen something similar in Claude Code, which also has gnarly TUI redraw issues: opening the full transcript view and then closing it also forces a redraw. That transcript workaround does not work in Codex, but the agent-switching workaround does.
For comparison, applications like nvim, top, etc. resize perfectly in the same environment, which removes the ever-so-slight suspicion it could be a Ghostty issue (which was a very low suspicion).
EDIT: I updated to 0.130.0 and the issue persists.
The original bug described in this bug report has been fixed.
@bmizerany, if you're still seeing similar behavior, please open a new bug report and fill in all of the information request in the bug report template.
If you are still seeing cases where the issue persists, please create a new bug report and fill out all of the information in the bug report template including detailed repro steps.
Activity
github-actions commentedon Oct 23, 2025
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
etraut-openai commentedon Oct 24, 2025
Thanks for posting. I think this may be a duplicate of #5259. If so, let's close this one. And feel free to upvote the existing issue.
PaulRBerg commentedon Dec 19, 2025
Still happening in Codex v0.75.0 in Warp terminal v0.2025.12.17.17.17.stable_02
Initial Width of Terminal
Expanded Width of Terminal
Codex text has not resized according to the terminal
mert-kurttutan commentedon Dec 29, 2025
Still happening in 0.77. I think this should be prioritized. It is very annoying when giving codex a chance to try out. Not a good a first impression
felixmin commentedon Jan 29, 2026
+1, this is extremely annoying and regularly makes me write "repeat your response"
PaulRBerg commentedon Jan 29, 2026
Still happening in v0.92
vprasanth commentedon Jan 30, 2026
This is pretty big issue for a tool built to run in the terminal
tui: harden inline scrollback bootstrap and scroll-region bounds (ope…
pthrasher commentedon Feb 9, 2026
FYI - I just submitted a PR that fixes this: #11221
tui: harden inline scrollback bootstrap and scroll-region bounds (ope…
4 remaining items
geekerzhou commentedon Mar 30, 2026
+1
figelwump commentedon Apr 1, 2026
I can reproduce this reliably in Ghostty. The issue is not limited to width changes:
Some more data:
Example from a live repro:
fix(tui): reflow scrollback on terminal resize (#18575)
Update codex fork to upstream 0.128.0 (#14)
fix(tui): reflow scrollback on terminal resize (openai#18575)
bmizerany commentedon May 9, 2026
I found a workaround. It’s annoying, but it consistently works for me:
Switch to another agent, then switch back. Codex appears to always have at least one background agent running, and changing agents seems to force a redraw. It is the only way I can get codex to redraw without exit+resume.
Sometimes
Ctrl-lwill fix it, maybe.I’ve seen something similar in Claude Code, which also has gnarly TUI redraw issues: opening the full transcript view and then closing it also forces a redraw. That transcript workaround does not work in Codex, but the agent-switching workaround does.
For comparison, applications like nvim, top, etc. resize perfectly in the same environment, which removes the ever-so-slight suspicion it could be a Ghostty issue (which was a very low suspicion).
EDIT: I updated to 0.130.0 and the issue persists.
etraut-openai commentedon May 9, 2026
The original bug described in this bug report has been fixed.
@bmizerany, if you're still seeing similar behavior, please open a new bug report and fill in all of the information request in the bug report template.
bmizerany commentedon May 9, 2026
What release?
etraut-openai commentedon May 9, 2026
I think it was 0.129.0. Make sure you're running the latest (0.130.0 or newer).
bmizerany commentedon May 9, 2026
#5576 (comment)
bmizerany commentedon May 9, 2026
I just tried 131 alpha 4 (still persists as it did in 129 and 130: https://github.com/user-attachments/assets/18fd498d-f627-429d-85be-740686542f05
etraut-openai commentedon May 9, 2026
If you are still seeing cases where the issue persists, please create a new bug report and fill out all of the information in the bug report template including detailed repro steps.