Custom statusline compressed to 1 char/line when notification banners are active

Status Closed — not planned
Reported on v2.1.49
Maintainer reply None cached
Activity 10 comments · opened Feb 21, 2026 · closed Mar 30, 2026

Bug description

When a UI notification banner is active (e.g., npm-deprecation-warning, programdata-deprecation-warning), custom statusline output is compressed vertically — each character renders on its own line, making the statusline completely unreadable.

This happens because the footer layout uses flex with different shrink behaviors:

  • Statusline container (H6): flexShrink: 1 — shrinks to accommodate notifications
  • Notifications container (Y6): flexShrink: 0 — never shrinks

When a multi-line notification banner appears, the statusline area shrinks to near-zero height, causing the text to wrap character-by-character.

Steps to reproduce

  1. Install Claude Code via npm (triggers npm-deprecation-warning banner on startup)
  2. Configure a custom statusline in ~/.claude/settings.json:

``json
{
"statusLine": {
"type": "command",
"command": "bash ~/.claude/statusline.sh"
}
}
``

  1. Start a new Claude Code session
  2. Observe the statusline is compressed/unreadable while the notification banner is visible (~15s)
  3. After the banner auto-dismisses, the statusline renders correctly

Expected behavior

The statusline should remain readable when notification banners are active. Either:

  • Both containers should share available space proportionally
  • The statusline should have flexShrink: 0 (or a minimum height)
  • Users should have a way to disable/suppress specific startup banners

Actual behavior

The statusline text wraps to 1 character per line, becoming completely unreadable. This persists for the duration of the notification banner (typically 15 seconds for startup banners).

!Image

Environment

  • Claude Code version: 2.1.49
  • Platform: Windows 11 (Git Bash)
  • Terminal: Windows Terminal
  • Install method: npm

Additional context

  • The addNotification system that displays these banners does NOT go through the Notification hook system, so there's no way to detect or suppress them from the statusline script
  • Identified ~20 notification types that can trigger this, most impactful being startup banners with 15s timeout
  • The statusLine.padding setting only adds horizontal spacing and does not help
  • No existing setting to disable specific notification banners
  • Related issues: #21867, #22222, #23623 (all involve statusline layout compression in different scenarios)

View original on GitHub ↗

10 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/25466
  2. https://github.com/anthropics/claude-code/issues/27158
  3. https://github.com/anthropics/claude-code/issues/27291

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

AmaralVini · 6 months ago

Not a duplicate — different root cause

The issues flagged as duplicates (#25466, #27158, #27291) all share the same symptom (statusline rendered 1 char per line), but have a different root cause:

| Issue | Root Cause | Duration | Trigger |
|-------|-----------|----------|---------|
| #25466 | stdout.columns returns 1 in WezTerm split panes | ~2s (self-corrects) | Split pane initialization |
| #27158 | stdout.columns returns 1 during welcome→REPL transition in tmux | ~2s (self-corrects) | tmux startup timing |
| #27291 | Terminal width detected as 1 on Windows startup | ~2s (self-corrects) | Windows Terminal startup |
| #27305 (this) | Footer flex layout: statusline flexShrink:1 vs notifications flexShrink:0 | ~15 seconds | Notification banners (e.g. npm-deprecation-warning) |

Key differences:

  1. Root cause is structural (CSS flex), not terminal width detection — The statusline container shrinks to near-zero height because notifications have flexShrink: 0 while the statusline has flexShrink: 1. The terminal correctly reports its width.
  1. Duration is much longer — The other issues self-correct in ~2 seconds. This issue persists for the full duration of the notification banner (typically 15 seconds for startup banners like npm-deprecation-warning).
  1. Different fix needed — The other issues would be fixed by clamping stdout.columns. This issue requires either:
  • Giving the statusline container flexShrink: 0 (or a minimum height)
  • Having both containers share available space proportionally
  • Allowing users to suppress specific notification banners

Screenshot

See the screenshot in the issue body showing the notification banner ("Claude Code has switched from npm to native installer...") compressing the statusline below it.

Budgulick · 6 months ago

Workaround

The root cause is the notification banner (e.g., npm-to-native nag) stealing all statusline space due to flexShrink: 0 vs flexShrink: 1.

You can suppress the banner entirely with an undocumented env var. Add to ~/.claude/settings.json:

{
  "env": {
    "DISABLE_INSTALLATION_CHECKS": "1"
  }
}

No banner = no flex layout conflict = statusline renders normally.

Found by reading the minified source — the notification check has an early return on process.env.DISABLE_INSTALLATION_CHECKS. More detail in my comment on #23683.

Tested on Windows 11, Claude Code 2.1.50 via npm.

Spud80 · 6 months ago

Confirming this on Windows 11 Pro (22621), Git Bash, Windows Terminal, Claude Code latest.

Additional debugging performed:

  1. Replaced Unicode block characters ( ) with ASCII (# -) — no change
  2. Removed all ANSI color codes from output — no change
  3. Replaced the entire bash script with a minimal inline jq command outputting just "Opus 4.6 | 0%" (10 chars) — still renders vertically at startup
  4. Even a hardcoded short string exhibits the same behavior

This confirms the issue is entirely in the TUI flex layout, not in the statusline command/script. The vertical rendering persists for the duration of the startup notification banner, then corrects itself — exactly as described in this issue.

ww2283 · 6 months ago

Same issue here — the "Context low (X% remaining) · Run /compact to compact & continue" banner squeezes my custom statusline, making it unreadable. Would appreciate either a flexShrink fix or a setting to suppress specific notification banners.

jeremych1000 · 6 months ago

Thanks @Budgulick - that works! Needs to be acknowledged and fixed - it's very annoying.

github-actions[bot] · 5 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

jeremych1000 · 5 months ago

Not a fix - please reopen

Astro-Han · 5 months ago

This is still very much an active problem. The rate-limit banner ("You've used X% of your weekly limit · resets at ...") triggers on every percentage point above ~70%, so during heavy sessions it fires repeatedly, compressing the custom statusline each time. Unlike the one-time startup banners, this is persistent and frequent.

DISABLE_INSTALLATION_CHECKS only suppresses the installation banner. DISABLE_COST_WARNINGS only suppresses cost warnings. Neither covers the rate-limit banner. There is currently no workaround for this case.

Would appreciate a reopen, since the underlying flex layout issue (analysis above) remains unfixed and affects more notification types than originally reported.

github-actions[bot] · 4 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.