CLI crashes with "Raw mode is not supported" error when piping input

Resolved 💬 6 comments Opened Aug 16, 2025 by kulapoo Closed Jan 7, 2026

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.83
  • Operating System: Pop!_OS 22.04 LTS (Ubuntu-based)
  • Terminal: Guake

Bug Description

Claude Code CLI crashes with a raw mode error when piping build output to it. The error Raw mode is not supported on the current process.stdin occurs because Ink (the React renderer for CLI apps) requires raw mode for interactive features, but this fails when stdin comes from a pipe instead of a TTY.

Steps to Reproduce

  1. Have a Node.js project with a build script
  2. Run command: npm run build | claude
  3. CLI attempts to process the piped build output
  4. Error occurs with message about raw mode not being supported

Expected Behavior

  • Claude Code should accept piped input from build commands
  • Should process build errors without requiring interactive mode
  • Should gracefully handle non-TTY input when data is piped

Actual Behavior

The application crashes immediately with:

Error: Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.

The CLI fails to process the piped build output and terminates.

Recording

!Image

Additional Context

Full error output:

Enter to confirm · Esc to exit
Error: Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported
    at handleSetRawMode (file:///home/[user]/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:806:3853)
    at file:///home/[user]/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:815:259
    at oF (file:///home/[user]/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:332:21530)
    at sX (file:///home/[user]/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:332:41141)
    at file:///home/[user]/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:332:39313
    at ZF0 (file:///home/[user]/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:326:8828)
    at Immediate.rG0 [as _onImmediate] (file:///home/[user]/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:326:9247)
    at process.processImmediate (node:internal/timers:491:21)

  ERROR  Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
        Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported

System Information:

  • Node.js version: v22.14.0
  • Shell: bash 5.1.16
  • Kernel: 6.12.10-76061203-generic

View original on GitHub ↗

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