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

Resolved 💬 3 comments Opened May 13, 2025 by gwpl Closed May 14, 2025

Environment

  • Platform (select one):
  • [X] Anthropic API
  • Claude CLI version: 0.2.107 (Claude Code) ( compiled/installed from https://aur.archlinux.org/packages/claude-code with yay)
  • Operating System: ArchLinux
  • Terminal: independent, fails in all: TMUX, xterm, Konsole ...

Bug Description

Trying to use claude-code in non-interactive programmatic way from other Agents/Program/Scripts.

Here I prepared minimal working example that illustrates problem:

$ echo  'describe last commits' | claude --output-format stream-json --allowedTools Edit Write Replace Agent Glob Grep LS Read 'Bash(gh:*)' 'Bash(git:*)'

error:

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:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:674:3662)
    at file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:683:261
    at UD (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:106:21373)
    at IB (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:106:40857)
    at file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:106:39053
    at Nk1 (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:100:12401)
    at Immediate.Qk1 [as _onImmediate] (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:100:12819)
    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

 - Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported
 - handleSetRawMode (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:674:3662)
 -  (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:683:261)
 - UD (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:106:21373)
 - IB (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:106:40857)
 -  (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:106:39053)
 - Nk1 (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:100:12401)
 - Immediate.Qk1 (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:100:12819)
 - 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
    at handleSetRawMode (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:674:3662)
    at file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:683:261
    at UD (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:106:21373)
    at IB (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:106:40857)
    at file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:106:39053
    at Nk1 (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:100:12401)
    at Immediate.Qk1 [as _onImmediate] (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:100:12819)
    at process.processImmediate (node:internal/timers:491:21)

Steps to Reproduce

Execute command above.

Expected Behavior

Claude code reads prompt from stdin and executes using allowed commands, and displayed TUI for user or if -p flag used, prints output and exists behaving in non interactive way.

Actual Behavior

Error. Even similar command worked earlier so issue seems flaky.

Additional Context

Potentially related issues with --allowedTools flag:

View original on GitHub ↗

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