[BUG] statusline-setup agent generates jq-dependent script that fails on Windows
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [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?
## Environment
- OS: Windows 11
- Claude Code version: 2.1.144
- Shell: Git Bash (bash)
## Description
The /statusline command (statusline-setup agent) generates a shell script
that uses jq to parse JSON input. This script fails silently on Windows
because:
jqis not available — not pre-installed on Windows, causing all
fields (model, context %, project name) to show as empty
/dev/stdindoes not exist on Windows — Node.js fallback using
/dev/stdin throws ENOENT error
basenamedoes not handle Windows backslash paths —
workspace.current_dir is returned as D:\\folder\\folder,
which basename cannot parse, resulting in . as the project name
## Workaround
Replace jq with node using process.stdin event, and convert
backslash paths with tr '\\' '/' before passing to basename.
What Should Happen?
statusline-setup should detect the OS and use a Windows-compatible
JSON parser (e.g. node with process.stdin, or python3) as a
fallback when jq is not available.
Error Messages/Logs
All dynamic fields are empty — statusline shows `[] 📁 . | 🌿 branch`
with no model name, no context %, no cost, no duration.
Steps to Reproduce
just /statusline in claude code terminal
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.144 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗