CLI 0.169.0: input area jumps when shortcut hints disappear while typing
What version of Codex CLI is running?
codex-cli 0.169.0
What subscription do you have?
ChatGPT Pro
Which model were you using?
gpt-6-Astra
What platform is your computer?
Linux VM, accessed over SSH from macOS
What terminal emulator and version are you using (if applicable)?
No response
Codex doctor report
What issue are you seeing?
The shortcut-hints row (“← for agents”, “? for shortcuts”) disappears while I type and reappears afterward. This makes the input area move vertically by one row, which is distracting.
I noticed this after upgrading to 0.169.0. Previously, the input area remained stable.
What steps can reproduce the bug?
- Open Codex CLI with a configured status line.
- Leave the input empty and observe the shortcut-hints row.
- Type some text, then clear the input.
- The hints row disappears and reappears, shifting the input area vertically.
What is the expected behavior?
Keep the input area at a stable vertical position when hints disappear. Alternatively, provide a setting to permanently hide shortcut hints while retaining the separate model/context/usage status line.
Additional information
Possibly related to PR #60681 (“avoid reserving an empty hints row when status is enabled”) and PR #60683.
Saving terminal space is understandable, but moving the active input area makes editing less comfortable.
There is a concrete measurement seam here on current main beyond the visual symptom. chat_composer/footer_state.rs::footer_hint_height() delegates to passive_hints().desired_rows(), while chat_composer/passive_hints.rs adds the ← for agents / ? for shortcuts labels only in FooterMode::ComposerEmpty, not ComposerHasDraft. composer_layout.rs::composer_rows() then allocates the resulting variable hint count alongside the status surface. In a status-line configuration, entering the first draft character can therefore remove an entire requested footer row, and clearing the draft can restore it. PR #60681 also changed some owned-transcript cursor assertions to tolerate a one-row offset, which is worth revisiting for this particular interaction.
A targeted regression would render the same fixed terminal with the status line enabled, no popup, and the sequence empty → type one character → clear, recording last_known_cursor_pos.y and composer layout/visible status in all three frames. Assert the editing caret remains on the same screen row while the hints may appear/disappear. Repeat once with an active task/queue hint and once near the footer's minimum height so a fix does not clip draft or status. A stable reserved hint slot (blank while typing), or another layout treatment that preserves the caret, could satisfy the invariant without forcing the hint text to remain visible.
Confirmed with released codex-cli 0.169.0 on macOS arm64: this moves the editing caret, not just the hint text. I measured a fixed 120×36 terminal using a private tmux 3.8 server (tmux display-message -p '#{cursor_y}' plus capture-pane). The input sequence was empty → type x → Backspace; no prompt was submitted.
| Configuration | Empty caret row | Draft caret row | Cleared caret row |
|---|---|---|---|
| Default fullscreen, status line enabled | 32 | 33 | 32 |
Default fullscreen, status_line=[] |
33 | 33 | 33 |
--no-alt-screen, status line enabled |
7 | 7 | 7 |
--no-alt-screen, status_line=[] |
7 | 7 | 7 |
Rows are zero-based. Enabled status configuration:
[tui]
status_line = ["model-name", "context-remaining"]
In the failing case the visible status row also moves 34 → 35 → 34; the shortcut row at 35 disappears while x is present. With --no-alt-screen, the same configured model/context status remains visible on row 9 throughout; the shortcut row toggles below it without moving the caret.
So codex --no-alt-screen is a temporary workaround for this tested case that retains the status line, at the cost of using inline scrollback rather than the fullscreen transcript. It does not permanently hide shortcuts.
AI-only verification with fresh isolated configuration, custom provider pointing to loopback, memories/plugins/daemon auto-start disabled, and --no-daemon. The loopback listener recorded zero requests across all four runs. These measurements cover a fresh idle composer, not an active task, history-filled viewport, popup, long draft, Linux/SSH run, or a built current-main binary. They provide a concrete release-level reproduction and a mode discriminator for a caret-position regression test.
Thanks for investigating and suggesting the workaround. I tried --no- alt-screen using iTerm2 on macOS over SSH to a Linux VM and noticed another difference: my configured status line no longer wraps, leaving some items out of view. In the default fullscreen mode, the same status line wraps across multiple rows.
Sharing this as an additional observation about the workaround’s trade-offs.
Confirmed — this limits the workaround I suggested earlier. I reproduced the clipping locally with released codex-cli 0.169.0, macOS arm64, tmux 3.8. There is also a useful discriminator: inline wrapping returns while a draft is present, then disappears again when the input is cleared.
Same status configuration in fresh isolated homes:
[tui]
status_line = ["model-name", "context-remaining", "current-dir", "codex-version", "total-input-tokens", "total-output-tokens"]
The fixture uses probe-model and a synthetic directory /tmp/c61554-XXXXXXXX/workspace-with-a-long-status-line-directory-name. Sequence: empty → type x → Backspace, without submitting a prompt.
| Terminal | Mode | Visible status rows, empty → draft → cleared | Caret row, same sequence |
|---|---|---|---|
| 80×36 | Fullscreen | 2 → 2 → 2 | 31 → 32 → 31 |
| 80×36 | --no-alt-screen |
1 → 2 → 1 | 8 → 8 → 8 |
| 120×36 | Fullscreen | 2 → 2 → 2 | 31 → 32 → 31 |
| 120×36 | --no-alt-screen |
1 → 2 → 1 | 7 → 7 → 7 |
Caret rows are zero-based. In both inline runs, the empty/cleared status ends in … and hides the trailing 0 out; typing x reveals the full status, including 0 out. Fullscreen keeps all selected items visible in these cases.
This matches the shared footer budget introduced by #60681. On current main ee344ca9, FooterLayout caps status plus hints together at two rows in inline mode. The empty-composer hint consumes one; it disappears with the draft. wrapped_rows skips wrapping when the status budget is one row. This is consistent with the intended cap, rather than requiring an SSH-specific explanation.
So my earlier result that inline mode “retains the status line” applies to the short configuration tested there; it does not ensure all configured items stay visible. A shorter list via /statusline can keep the workaround usable, but it does not satisfy the original requirement of a stable fullscreen caret with the wrapped status preserved. A regression for that requirement should check both caret position and trailing status-item visibility across the three frames.
AI-only local verification: four controlled TUI runs, no prompt submitted, zero requests recorded by the loopback provider. This does not reproduce the Linux/SSH environment or establish that a current-main build is fixed.
Thanks for the bug report. This will be addressed in an upcoming release.