Custom statusline compressed to 1 char/line when notification banners are active
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
- Install Claude Code via npm (triggers
npm-deprecation-warningbanner on startup) - Configure a custom statusline in
~/.claude/settings.json:
``json``
{
"statusLine": {
"type": "command",
"command": "bash ~/.claude/statusline.sh"
}
}
- Start a new Claude Code session
- Observe the statusline is compressed/unreadable while the notification banner is visible (~15s)
- 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).
Environment
- Claude Code version: 2.1.49
- Platform: Windows 11 (Git Bash)
- Terminal: Windows Terminal
- Install method: npm
Additional context
- The
addNotificationsystem that displays these banners does NOT go through theNotificationhook 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.paddingsetting 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)
10 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
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.columnsreturns 1 in WezTerm split panes | ~2s (self-corrects) | Split pane initialization || #27158 |
stdout.columnsreturns 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:1vs notificationsflexShrink:0| ~15 seconds | Notification banners (e.g. npm-deprecation-warning) |Key differences:
flexShrink: 0while the statusline hasflexShrink: 1. The terminal correctly reports its width.npm-deprecation-warning).stdout.columns. This issue requires either:flexShrink: 0(or a minimum height)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.
Workaround
The root cause is the notification banner (e.g., npm-to-native nag) stealing all statusline space due to
flexShrink: 0vsflexShrink: 1.You can suppress the banner entirely with an undocumented env var. Add to
~/.claude/settings.json: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.
Confirming this on Windows 11 Pro (22621), Git Bash, Windows Terminal, Claude Code latest.
Additional debugging performed:
█░) with ASCII (#-) — no change"Opus 4.6 | 0%"(10 chars) — still renders vertically at startupThis 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.
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.
Thanks @Budgulick - that works! Needs to be acknowledged and fixed - it's very annoying.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
Not a fix - please reopen
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_CHECKSonly suppresses the installation banner.DISABLE_COST_WARNINGSonly 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.
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.