Skip to content

Claude Code statusLine command: stdin JSON not piped correctly #3371

@n8733380-cpu

Description

@n8733380-cpu

Description

When using Claude Code inside WaveTerm, the custom statusLine command does not receive any JSON data via stdin, causing the statusline to fall back to a generic output instead of displaying model info, context usage, token counts, etc.

How Claude Code statusLine works

Claude Code supports a custom statusline via settings.json:

"statusLine": {
  "type": "command",
  "command": "pwsh -NoProfile -File statusline-command.ps1"
}

Claude Code is supposed to pipe a JSON payload to the command's stdin after each response. The JSON includes model.display_name, context_window.used_percentage, rate_limits, cwd, session_name, etc.

What happens in WaveTerm

The command is executed, but stdin is empty. The script reads nothing from [Console]::In.ReadToEnd(), causing it to hit the fallback and output just claude instead of the full statusline.

The same script works correctly in Windows Terminal where stdin is properly piped.

Steps to Reproduce

  1. Configure Claude Code statusLine with a custom command that reads from stdin
  2. Run Claude Code inside WaveTerm
  3. Observe the statusline only shows the fallback output

Expected Behavior

The custom statusline command should receive the JSON payload via stdin, same as in other terminals.

Environment

  • WaveTerm (latest)
  • Windows 11
  • Claude Code CLI
  • PowerShell 7 (pwsh)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions