[BUG] Multi-line statusline output renders characters vertically (one char per line)

Resolved 💬 3 comments Opened Feb 24, 2026 by mcho71 Closed Feb 24, 2026

Preflight Checklist

  • [x] I have searched existing issues and found related reports (#27849, #27443, #27737)
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Summary

A multi-line statusline script (using printf '\n%s' to output separate segments) renders each character vertically — one character per line — instead of displaying each segment on its own horizontal line. This started occurring somewhere between v2.1.42 and v2.1.51.

Relation to Existing Issues

This appears to be the same underlying TUI renderer bug as #27849, #27443, and #27737, but with a multi-line output reproduction case. Those issues report single-line scripts rendering vertically; this issue shows the bug also affects multi-line printf '\n%s' output where each segment was previously rendered as a separate horizontal row.

Environment

  • OS: macOS (Darwin 25.2.0)
  • Claude Code version: 2.1.51
  • Terminal: iTerm2
  • Shell: fish

Statusline Config

{
  "statusLine": {
    "type": "command",
    "command": "bash /Users/mcho/.claude/statusline-command.sh"
  }
}

Script (simplified)

The script builds an array of status parts (model name, branch, git status, PR info) and outputs them as separate lines:

status_parts=("Opus 4.6" "main" "*" "PR: OPEN")

# Output each part on its own line
printf '%s' "${status_parts[0]}"
for ((i=1; i<${#status_parts[@]}; i++)); do
    printf '\n%s' "${status_parts[i]}"
done

Expected Behavior

Each segment renders as a separate horizontal row in the status area:

Opus 4.6
main
*
PR: OPEN "feature branch"

This worked correctly before v2.1.42.

Actual Behavior

Characters are rendered vertically — each character on its own line — as if the available width is 1 character. The statusline area shows a scrolling/typewriter effect.

What Should Happen?

Multi-line statusline output (each echo/printf producing a separate row, as documented at https://code.claude.com/docs/en/statusline) should render each line horizontally, not character-by-character vertically.

Error Messages/Logs

Steps to Reproduce

  1. Configure a statusline script that outputs multiple lines via printf '\n%s'
  2. Start Claude Code v2.1.51
  3. Observe that the statusline text renders vertically (one character per line)

Claude Model

None

Is this a regression?

Yes, this worked before

Last Working Version

~2.1.42

Claude Code Version

2.1.51

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2 / fish

Additional Information

Workaround: joining all parts into a single line with | separator and outputting via a single printf '%s\n' call avoids the issue, but loses the multi-line layout.

View original on GitHub ↗

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