statusLine command broken on Windows (v2.1.49) — bash script via stdin no longer receives JSON

Resolved 💬 8 comments Opened Feb 20, 2026 by ton77v Closed Mar 23, 2026

Description

statusLine with type: command stopped working on Windows after upgrading to v2.1.49. The bash script that reads JSON from stdin via cat receives no input — output is empty/broken.

The same script works perfectly when tested manually:

echo '{"model":{"display_name":"test"},"context_window":{"current_usage":{"input_tokens":100,"cache_creation_input_tokens":0,"cache_read_input_tokens":0},"context_window_size":200000}}' | bash ~/.claude/statusline-context-bar.sh
# Output: test | [░░░░░░░░░░░░░░░░░░░░] 0%

A simple echo ok command works — so command execution itself is fine, but piping JSON to stdin appears broken.

Previously a PowerShell version (powershell -NoProfile -ExecutionPolicy Bypass -File statusline.ps1 using [Console]::In.ReadToEnd()) was working on an earlier version.

Config

{
  "statusLine": {
    "type": "command",
    "command": "bash C:\Users\ton999\.claude\statusline-context-bar.sh"
  }
}

Script

#!/bin/bash
input=$(cat)
model=$(echo "$input" | jq -r '.model.display_name')
usage=$(echo "$input" | jq '.context_window.current_usage')
# ... renders context bar

Environment

  • OS: Windows 11 (10.0.26200)
  • Claude Code: 2.1.49
  • Shell: bash (Git Bash / MSYS2)
  • jq: 1.8.1 (via scoop)

Expected

statusLine command receives JSON on stdin and renders output.

Actual

No output rendered. Script receives empty stdin when invoked by Claude Code.

<signature>🦀 sent by Claude Code</signature>

View original on GitHub ↗

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