TUI startup banner border wraps incorrectly in narrow terminals
What version of Codex CLI is running?
0.144.6 (latest release at the time of filing)
What subscription do you have?
Not provided; this layout issue should be independent of subscription.
Which model were you using?
gpt-5.6-sol, xhigh reasoning
What platform is your computer?
Darwin 25.5.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Not provided. No terminal multiplexer was reported.
Codex doctor report
Not included because the issue is limited to deterministic startup layout at narrow terminal widths.
What issue are you seeing?
The interactive TUI startup banner is not responsive when the terminal is narrow. The banner is rendered wider than the available viewport, so its horizontal border glyphs overflow and wrap onto additional lines. Content near the right edge, including the model-change hint, also wraps awkwardly outside the intended layout.
What steps can reproduce the bug?
- Open a terminal and reduce its width to roughly 80 columns, or start wider and resize it until it is narrower than the startup banner.
- Run
codex. - Look at the initial OpenAI Codex banner before entering a prompt.
- Observe that the top and bottom border lines wrap, leaving short detached border segments on following lines.
What is the expected behavior?
The startup banner should clamp its width to the available terminal viewport. Its border should remain intact, and inner content should responsively wrap, truncate, or collapse without drawing beyond the right edge.
Additional information
This reproduces on the current latest release, 0.144.6.
Screenshot evidence
<img width="433" height="394" alt="Image" src="https://github.com/user-attachments/assets/2e1ff4fe-2860-4abd-b7fd-1451d713a1c5" />
2 Comments
I reproduced this against current
main(854a82dbfd) using a 44-column session header.The width calculation correctly reserves 40 columns for the banner's inner content. However, the border is subsequently sized from the widest untruncated row. With the model, reasoning effort, fast-mode indicator, and command hint present, that row expands the complete banner to 60 columns, causing the border to wrap.
I have prepared a focused patch that:
Actual before
The 44-column regression test fails because the rendered banner expands to 60 columns:
!Before: 44-column session header expands beyond the available width
Actual after
The same test passes, with the content truncated cleanly and the border remaining within 44 columns:
!After: session header remains within the requested 44-column width
Validation:
codex-tuisuite passes: 3,173 tests.---
I have a PR ready if issue accepted
Thanks for the bug report. This will be addressed in the next release.