Custom statusLine command output renders vertically on Windows
Resolved 💬 3 comments Opened Feb 13, 2026 by Jerempire Closed Feb 16, 2026
Description
Custom statusLine command output renders each character on its own line instead of displaying horizontally on Windows.
Environment
- OS: Windows 11 Pro (10.0.26200)
- Terminal: PowerShell
- Claude Code version: Latest (native installer)
Steps to Reproduce
- Add a custom status line to
~/.claude/settings.json:
"statusLine": {
"type": "command",
"command": "node \"C:/Users/jmj2z/.claude/statusline.js\""
}
- With
statusline.js:
let input = '';
process.stdin.on('data', chunk => input += chunk);
process.stdin.on('end', () => {
try {
const data = JSON.parse(input);
const model = data.model?.display_name || data.model?.id || '?';
const pct = Math.round(data.context_window?.used_percentage || 0);
const cost = data.cost?.total_cost_usd;
const costStr = cost != null ? ` | $${cost.toFixed(2)}` : '';
process.stdout.write(`${model} | ctx: ${pct}%${costStr}`);
} catch {
process.stdout.write('--');
}
});
- Launch Claude Code
Expected Behavior
Status line displays horizontally at the bottom:
Opus 4.6 | ctx: 0% | $0.00
Actual Behavior
Each character renders on its own line:
O
p
u
s
4
.
6
|
c
t
x
:
0
%
|
$
0
.
0
0
Troubleshooting Done
- Confirmed the script outputs a single line (no
\r\nin output) - Tested with
.replace(/[\r\n]/g, '')— same result - Removing the custom
statusLineconfig restores the default status line, which renders correctly - Resizing the terminal window does not fix it
- Issue persists across new terminal windows and Claude Code restarts
- The built-in default status line works perfectly — only custom command status lines are affected
Likely Cause
The status line renderer appears to read pipe output character-by-character on Windows, treating each character as a separate line. This may be a Node.js pipe buffering difference on Windows vs Unix.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗