Omniscio

OmniscioGuidesstdin is not a terminal

Claude Code can't read the keyboard here: stdin is not a terminal

Last checked against Anthropic's documentation on November 21, 2026. By the Omniscio team. Updated .

What is the exact message?

On Windows the message reads:

Claude Code can't read the keyboard here: stdin is not a terminal (it is piped, redirected, or supplied by the program that launched claude), and on Windows it can't fall back to the console for input yet.
Run claude directly in Windows Terminal, PowerShell, or Command Prompt, without piping or redirecting its input.
To send text as a prompt and print the reply instead, add -p; it also works with --continue and --resume <session-id> (for example: type notes.md | claude -p --continue).

On macOS and Linux the same check produces a message whose first line names /dev/tty in place of the Windows wording. Anthropic does not print that variant in full; the phrase to match on either system is stdin is not a terminal.

What does it mean?

You ran claude without -p, which starts an interactive session, but its standard input is not a terminal. Something piped or redirected it — a script, a CI step, or a command like claude < /dev/null — or the program that launched claude supplied its own input stream.

An interactive session needs a terminal to read your keystrokes from. What Claude Code does without one depends on the platform:

  • Windows: it prints the message to stderr and exits with code 1 instead of starting the interface.
  • macOS and Linux: it reads your keystrokes from /dev/tty and starts the session, with any piped text as your first prompt. You see the message when /dev/tty cannot be opened.

Before v2.1.287, Claude Code started the interface instead of printing this message, then either showed nothing on screen or failed with an error containing Raw mode is not supported.

How do I fix it?

  1. To work interactively, run claude directly in a terminal, without piping or redirecting its input.
  2. To get a reply without the interface, for example from a script, add -p and give the prompt as an argument or on stdin: claude -p "your question" or echo "your question" | claude -p.
  3. The same works with --continue and --resume <session-id>. Anthropic's example is type notes.md | claude -p --continue; on macOS and Linux, cat notes.md | claude -p --continue.
  4. If another program starts claude for you — a script, a CI step or an editor's build command — that program is supplying the input. Start the session yourself in a terminal, or have it call claude -p.

How do I know it worked?

  • Run interactively, Claude Code opens its prompt and accepts typing instead of exiting with the message.
  • Run with -p, the command prints the answer and exits instead of opening an interface.
  • Run from a pipe, the answer matches the text you piped in.

Where these answers come from

Common questions

What does "stdin is not a terminal" mean in Claude Code?

You ran claude without -p, which starts an interactive session, but its standard input is not a terminal. Something piped or redirected it, or the program that launched claude supplied its own input stream.

What happens on Windows and on macOS or Linux?

On Windows, Claude Code prints the message to stderr and exits with code 1. On macOS and Linux it reads your keystrokes from /dev/tty and starts the session with any piped text as your first prompt; the message appears when /dev/tty cannot be opened.

How do I pipe a prompt to Claude Code correctly?

Add -p and give the prompt as an argument or on stdin, as in claude -p "your question" or echo "your question" | claude -p. The same works with --continue and --resume <session-id>.

I used to see Raw mode is not supported. What changed?

Before v2.1.287, Claude Code started the interface instead of printing this message, then either showed nothing on screen or failed with Raw mode is not supported. If you see that line during claude install instead, it is a different failure with its own install guidance.