What
Passing a prompt that contains only spaces or newlines to --print now reports that specifically instead of the generic missing-input error.
Details
- Message:
Error: Input contained only whitespace. Provide a prompt with text through stdin or as a prompt argument when using --print.
Evidence
Error: Input contained only whitespace. Provide a prompt with text through stdin or as a prompt argument when using --print
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Names in the bundle--print
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed since
Anthropic's documentation has since written up --print, on Claude Code changelog.
* Fixed PermissionRequest hooks not firing in `--print` modechangelog see the edit
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up --print, on Claude Code changelog.