Anchor prompt to bottom of viewport when scrollback exists

Resolved 💬 2 comments Opened Mar 28, 2026 by cweill Closed Mar 28, 2026

Problem

When running codex in a terminal pane with scrollback history above the current prompt, the prompt floats mid-screen with blank space below it. This wastes viewport height, especially in multiplexer setups (tmux, amux) where codex runs in small panes (e.g., 30x22).

Example: a 22-row pane shows ~5 rows of prompt/status bar, then 17 blank rows below. The scrollback history is above but the prompt doesn't anchor to the bottom.

Expected behavior

The prompt should anchor to the bottom of the viewport when scrollback exists — scrollback fills upward, new content pushes from the bottom. This is how shells and most TUI chat interfaces work.

Repro

  1. Start codex in a small terminal pane (~30 columns, ~20 rows)
  2. Run a task so there's scrollback history
  3. After the task completes, observe the prompt position — it sits mid-screen with blank space below

Context

This is particularly visible when running many codex instances in parallel in a terminal multiplexer grid (15+ panes). Every pane is mostly blank space at the idle prompt.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗