openai / openai/codex

TUI composer/footer can remain above the viewport bottom, leaving a large blank region

Open
#41,765 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI TUI windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of Codex CLI is running?

codex-cli 0.151.0

What subscription do you have?

Not collected; this appears to be local TUI layout behavior.

Which model were you using?

gpt-5.6-sol with max reasoning. The symptom does not appear model-specific.

What platform is your computer?

Confirmed reproduction:

  • Windows 11 Pro for Workstations Insider Preview, x64, build 26220.9223

Also observed by the reporter:

  • Linux; exact distribution and version were not collected yet.
What terminal emulator and version are you using (if applicable)?

Confirmed Windows reproduction:

  • Windows Terminal 1.24.11911.0
  • PowerShell 7.6.5
  • Direct Windows Terminal session, with WT_SESSION present and no multiplexer detected

Linux terminal details were not collected yet.

Codex doctor report

A full report is omitted because it includes local paths and unrelated configuration inventory. Relevant sanitized fields:

codexVersion: 0.151.0
platform: windows-x86_64
terminal: Windows Terminal
terminal size at collection time: 131x38
config parse: ok

No tui.alternate_screen, raw_output_mode, animations, or disable_paste_burst override was found.

What issue are you seeing?

During normal Codex CLI use, the active composer and status/footer can end up positioned substantially above the physical bottom of the terminal viewport.

The composer remains usable and its surrounding status information renders correctly, but a large completely unused blank region appears below the footer. The terminal is already following the active/latest output; this is not the user intentionally scrolling upward through scrollback.

The resulting layout can waste a substantial fraction of the visible terminal.

This has been observed on both Windows and Linux, so the observed behavior is not specific to Windows Terminal or ConPTY.

What steps can reproduce the bug?

The exact transition trigger is not isolated and reproduction is currently intermittent:

  1. Start Codex CLI normally in inline mode.
  2. Run a task/session long enough to produce transcript and tool activity.
  3. Continue using the TUI normally.
  4. At some point, the active composer/footer can remain well above the terminal's physical bottom.
  5. Observe many unused rows below the footer even though the composer is still the active input area and the terminal is following the latest output.

The state has been observed during an active task, including while Working (...) is visible.

What is the expected behavior?

When Codex is following the latest output and the active composer is visible, the composer/status region should occupy the bottom portion of the current terminal viewport, with transcript/output using the available rows above it.

There should not be a large unused region below the active footer.

Actual behavior

The composer/status block can remain well above the physical bottom of the terminal, leaving many unused rows below it.

Source-level hypothesis (not confirmed)

The current inline resize-reflow code updates area.height to the newly desired bottom-pane height, but adjusts area.y to preserve bottom alignment only when the viewport would overflow or when the physical terminal height grows.

If the internal desired viewport height shrinks while the physical terminal height is unchanged and the viewport was previously bottom-aligned, the existing area.y can be retained while area.height becomes smaller. That would make area.bottom() move upward and leave blank rows below it.

Relevant 0.151.0 source:

https://github.com/openai/codex/blob/78c290807ce710180111df227df3b7a4fe845452/codex-rs/tui/src/tui.rs#L911-L945

This is a possible mechanism inferred from source, not a confirmed root cause or a deterministic reproduction.

Related issues
  • #16134 describes the same visible symptom ("prompt floats mid-screen with blank space below") but was closed as a duplicate of #15874.
  • #15874 primarily requested independently scrollable transcript/input UX and was later closed because it did not receive enough upvotes.
  • #26311 is an open feature request for an optional pinned composer.
  • This report is about an observed intermittent layout failure while the active/latest composer is already visible, not merely a request for a new always-pinned composer mode.

A screenshot is available, but the current copy contains a local workspace name and is omitted from the public report.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read codex-rs/tui/src/tui.rs around lines 911-945, focusing on the inline resize-reflow behavior described in the report. Reproduce the intermittent layout issue in inline mode after a session with transcript and tool activity, then verify that the active composer/footer remains aligned with the terminal bottom without unused rows below it.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.