Multi-line status line causes cursor offset in interactive selection UI

Resolved 💬 2 comments Opened Mar 6, 2026 by PwnZoner Closed Apr 4, 2026

Summary

When using a multi-line custom status line (2+ lines), interactive selection prompts (e.g., multiple-choice lists from AskUserQuestion) render with incorrect cursor positioning. The cursor and option text are offset by the number of extra status line rows, causing text from one option to bleed into adjacent option lines.

Steps to reproduce

  1. Configure a multi-line status line in ~/.claude/settings.json:

``json
{
"statusLine": {
"type": "command",
"command": "npx -y ccstatusline-usage@latest",
"padding": 0
}
}
``

  1. Configure the status line tool to output 2 lines (e.g., session info on line 1, context bar on line 2)
  2. Start Claude Code and trigger an interactive multi-choice prompt (e.g., AskUserQuestion with 4+ options)
  3. Use arrow keys to scroll through options

Expected behavior

Cursor highlights the correct option, text stays on its own line.

Actual behavior

  • Option text from line N renders on line N+1 when scrolling
  • Words from previous options bleed onto the wrong line
  • Menu items shift outside the selection area (e.g., last option appears below the text input)

Confirmed: status line row count is the cause

  • 2-line status line: bug reproduces consistently
  • 1-line status line: bug does NOT reproduce (same config, same prompt, just fewer output lines)
  • padding: 0 in both cases — horizontal padding is not a factor

Environment

  • Claude Code: 2.1.63
  • Terminal: iTerm2 on macOS (Darwin 24.6.0)
  • Status line tool: ccstatusline-usage@latest (2-line output)

Hypothesis

The interactive selection component (Ink-based TUI) calculates available terminal rows without subtracting the status line height. With a 1-line status line the offset is not noticeable, but with 2+ lines the row miscalculation becomes visible as cursor drift proportional to the extra lines.

View original on GitHub ↗

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