Multi-line statusline: second line disappears on narrow terminals instead of wrapping

Resolved 💬 5 comments Opened Feb 25, 2026 by SpunkyMartian Closed Mar 25, 2026

Description

Custom statusline scripts that output multiple lines (separated by \n) no longer display all lines when the terminal window is narrow. Instead of wrapping long lines naturally (as it used to), Claude Code now truncates the first line with ... and drops all subsequent lines entirely.

For context, my statusline script outputs two newline-separated lines:

  • Line 1: Model name, working directory, git branch/status, lines changed (e.g. Opus 4.6 (1M context) | ~/project | main +1 ?1 | +1/-1)
  • Line 2: Context window usage, API rate limits, extra usage credits (e.g. context: 28.6k/800.0k 3% | current: 18% resets 3:30am | weekly: 16% ...)

Previous behavior

When the terminal was narrow:

  • Long lines would wrap to the next visual row
  • All output lines from the script remained visible (sometimes spanning 3+ visual rows)
  • All content was accessible regardless of terminal width

Current behavior

When the terminal is narrow:

  • The first output line is truncated to the terminal width with ... appended (no wrapping)
  • The second output line is completely hidden — no content from it is shown at all
  • When the window is widened enough for the first line to fit, the second line reappears

Steps to reproduce

  1. Configure a custom statusline script that outputs 2+ lines separated by \n
  2. Resize the terminal window to be narrow enough that the first line exceeds the terminal width
  3. Observe that the first line is truncated with ... and all subsequent lines disappear

Screenshots

Narrow window — second line (context/usage info) is completely missing, first line truncated with ...:

Opus 4.6 (1M context)  |  ~/My Code/claude-statusline  |  main +1 ?1  |  +1/-...

▸▸ bypass permissions on (shift+tab to cycle)

Wide window — both output lines visible:

Opus 4.6 (1M context)  |  ~/My Code/claude-statusline  |  main +1 ?1  |  +1/-1
context: 28.6k/800.0k 3%  |  current: 18% resets 3:30am  |  weekly: 16% resets feb 27, 12:30am  |  extra usage: $50.00 left
▸▸ bypass permissions on (shift+tab to cycle)

Expected behavior

All output lines from the statusline script should remain visible regardless of terminal width. Long lines should wrap naturally rather than being truncated, as they did in earlier versions.

Environment

  • Claude Code version: 2.1.58 (installed via npm)
  • OS: macOS (Darwin 25.3.0)
  • Terminal: default macOS terminal
  • Statusline config: custom Python script outputting 2 newline-separated lines via sys.stdout.write()

View original on GitHub ↗

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