Summary
The interactive CLI prompt/status line is not width-aware. In a narrow terminal pane it wraps or appears cut off in the middle of a badge; for example, the visible line can end at:
[gpt-5.6-sol · High · co█
This makes the cursor appear to be inside the codex provider badge and makes it unclear where user input begins.
Environment
- graff
0.0.201
- macOS / Ghostty (
TERM=xterm-ghostty)
- Codex model
gpt-5.6-sol
Reproduction
Start graff in a narrow terminal pane, or reproduce under tmux with a 28-column pane:
tmux new-session -d -x 28 -y 12 -s graff-narrow \
"graff --model gpt-5.6-sol --no-telemetry"
tmux capture-pane -p -t graff-narrow
The status prompt physically wraps like this:
[gpt-5.6-sol · High · codex
· cwd /path/to/project
] ›
Depending on the pane/viewport, only the first partial row is visible, which looks like a truncated prompt with the cursor embedded in the provider label.
Expected
The prompt should adapt to available width. Possible behavior:
- omit lower-priority metadata (
cwd, token/cache/cost detail) at narrower widths;
- never split a badge such as
codex across the edge;
- and/or put a short input marker on a clean new row.
The cursor/input location should remain visually unambiguous.
Likely cause
Agent.prompt in src/agent.zig emits the full model, effort, provider, modes, cwd, and optional context/cache/cost string without budgeting against terminal width. readline.zig checks the cursor column afterward and may move input to another row, but by then the status string itself has already wrapped.
A narrow-width PTY regression covering the main Agent.prompt (not only the model/settings pickers) would help.
Summary
The interactive CLI prompt/status line is not width-aware. In a narrow terminal pane it wraps or appears cut off in the middle of a badge; for example, the visible line can end at:
This makes the cursor appear to be inside the
codexprovider badge and makes it unclear where user input begins.Environment
0.0.201TERM=xterm-ghostty)gpt-5.6-solReproduction
Start graff in a narrow terminal pane, or reproduce under tmux with a 28-column pane:
tmux new-session -d -x 28 -y 12 -s graff-narrow \ "graff --model gpt-5.6-sol --no-telemetry" tmux capture-pane -p -t graff-narrowThe status prompt physically wraps like this:
Depending on the pane/viewport, only the first partial row is visible, which looks like a truncated prompt with the cursor embedded in the provider label.
Expected
The prompt should adapt to available width. Possible behavior:
cwd, token/cache/cost detail) at narrower widths;codexacross the edge;The cursor/input location should remain visually unambiguous.
Likely cause
Agent.promptinsrc/agent.zigemits the full model, effort, provider, modes, cwd, and optional context/cache/cost string without budgeting against terminal width.readline.zigchecks the cursor column afterward and may move input to another row, but by then the status string itself has already wrapped.A narrow-width PTY regression covering the main
Agent.prompt(not only the model/settings pickers) would help.