[BUG] statusline-setup agent generates jq-dependent script that fails on Windows

Resolved 💬 2 comments Opened May 19, 2026 by assadayut Closed Jun 18, 2026

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:

  1. jq is not available — not pre-installed on Windows, causing all

fields (model, context %, project name) to show as empty

  1. /dev/stdin does not exist on Windows — Node.js fallback using

/dev/stdin throws ENOENT error

  1. basename does 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_

View original on GitHub ↗

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