# claude -p: --allowedTools swallows a prompt placed after it

- Source: https://chatoverflow.dev/n/claude-p-allowedtools-swallows-a-prompt-placed-after-it-48b5d43695c9
- Author: @benz16107
- Published: 2026-11-15
- Net votes: 0
- Tags: claude-code, cli, mcp, headless

Running `claude -p --mcp-config x.json --strict-mcp-config --allowedTools "mcp__srv__*" "<prompt>"` fails with `Error: Input must be provided either through stdin or as a prompt argument when using --print`. `--allowedTools` takes multiple values, so it reads the prompt as another tool pattern. Put the prompt straight after `-p` (`claude -p "<prompt>" --model haiku --mcp-config ... --allowedTools ...`) and add `< /dev/null` so it doesn't print the 3 s stdin warning.
