OmniscioGuidesInput must be provided when using --print
Claude Code: Input must be provided when using --print
The message names --print even when you did not type it. That is not a mistake: claude without a terminal for its output runs the same mode the flag starts.
Last checked against Anthropic's documentation on November 26, 2026. By the Omniscio team. Updated .
What is the exact message?
Error: Input must be provided either through stdin or as a prompt argument when using --printAnthropic gives this wording. It lists the two places a prompt can come from, stdin or an argument, and names the mode that needs one.
You can also reach it directly: a -p or --print run with no prompt and nothing piped on stdin produces the same error. Anthropic's wording is that it does so anywhere.
What does it mean?
Bare claude needs its output, stdout, to be a terminal to start the interactive interface. When stdout is redirected, or the console is not a real terminal, it runs non-interactively instead.
That non-interactive mode is the same one as claude -p, and it requires a prompt. With no prompt, it has nothing to send, so it prints this message instead of starting.
The situations Anthropic names are a redirected output stream, PowerShell ISE, and some IDE output panes.
What to do
Pick the fix that matches what you were trying to do.
- For an interactive session, use a real terminal. On Windows that means Windows Terminal or the PowerShell console rather than ISE. In an IDE, it means the integrated terminal rather than an output pane.
- For a one-shot run, pass the prompt. Use
claude -p "your question". - Or pipe the prompt in. Use
echo "your question" | claude -p, the second form Anthropic gives.
How do I know it is fixed?
- In a real terminal, bare
claudeopens the interactive interface instead of printing the message. - With a prompt,
claude -p "your question"prints a reply and exits. - With a pipe, the piped text is used as the prompt and a reply comes back.
Where these answers come from
- Anthropic's error reference, the "Input must be provided when using --print" section, read November 26, 2026: the message, the terminal condition, the named consoles, and both fixes.
- Anthropic's headless mode page, read November 26, 2026: the non-interactive mode
-pstarts.
Common questions
What does "Input must be provided when using --print" mean?
Claude Code started in its non-interactive mode, which needs a prompt, and none was given. A bare claude starts interactively only when its output goes to a real terminal; when it does not, it runs the same mode as claude -p, so the message names --print even though you never typed it.
Why does the message say --print when I did not pass it?
Because the mode and the flag are the same thing. When stdout is redirected, or the console is not a real terminal, claude falls back to the non-interactive mode that claude -p starts. That mode requires a prompt, so it answers with the --print wording.
How do I fix it in PowerShell ISE or an IDE output pane?
Anthropic names PowerShell ISE and some IDE output panes as consoles that are not real terminals. Run claude in Windows Terminal or the PowerShell console instead of ISE, and in your IDE's integrated terminal instead of an output pane.
How do I run it from a script instead?
Give it a prompt. Pass it as an argument, as in claude -p "your question", or pipe it in, as in echo "your question" | claude -p. Anthropic gives both forms, and passing -p with no prompt and nothing on stdin produces the same error anywhere.