TUI: Skill picker scrolls with main viewport during history insertion (repeats "Skill Creator")

Open 💬 0 comments Opened Feb 4, 2026 by dyxushuai

What version of Codex is running?

codex-cli 0.94.0

What subscription do you have?

Unknown

Which model were you using?

Unknown (repro appears UI-level / model-independent)

What platform is your computer?

Darwin 25.2.0 arm64 unknown

What terminal emulator and version are you using (if applicable)?

WezTerm 20260117-154428-05343b38

What issue are you seeing?

When the main TUI viewport is actively scrolling due to a long streamed response summary/output (history insertion above the viewport), opening the skill picker by typing $ causes the picker menu to scroll along with the main screen.

The menu content becomes corrupted and every row shows the same entry (observed: Skill Creator).

What steps can reproduce the bug?

  1. Start Codex CLI (TUI).
  2. Trigger a response that produces a long summary/output so the main viewport scrolls (history insertion above the viewport).
  3. While the viewport is scrolling, type $ to open the skill picker.
  4. Observe the skill picker menu scrolls together with the main viewport and its rows are duplicated/corrupted.

What is the expected behavior?

The skill picker popup/menu should be stable and not scroll with the main viewport. Entries should render correctly.

Additional information

Root-cause hypothesis

  • The TUI inserts history lines above the viewport using a scroll region (DECSTBM). When the inline viewport occupies the full screen (viewport y == 0 and height == screen_height) and history insertion happens concurrently with a bottom-pane popup (skill picker), the scroll region can degenerate and affect the entire screen, effectively “scrolling” the popup and corrupting its rendering.

Suggested fix (high-level)

  • Ensure we never attempt to insert history lines when the viewport is full-screen by reserving at least one row above the viewport whenever there are pending history lines. This guarantees a valid/non-degenerate scroll region and isolates bottom-pane popups from scrollback insertion.

Patch status

  • I have a local fix + tests ready and can open an invited PR if desired (external contributions are invitation-only per docs/contributing.md).

Tests run (for the local patch)

  • cd codex-rs && just fmt
  • cd codex-rs && cargo test -p codex-tui
  • cd codex-rs && cargo clippy -p codex-tui --all-features --tests -- -D warnings

View original on GitHub ↗