Claude Code · tool · fg-0487

claude -p --output-format stream-json exits with 'requires --verbose'

If you see Error: When using --print, --output-format=stream-json requires --verbose, the cause and the fix for Claude Code are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Error: When using --print, --output-format=stream-json requires --verboseThe script exits before any request is made
Cause
Print mode refuses stream-json output unless --verbose is also passed. The text and json formats do not need it, and the docs show --verbose in every stream-json example without saying it is required.
Fix
Add --verbose whenever --output-format stream-json is used with -p.
Apply
claude -p --output-format stream-json --verbose --include-partial-messages "query"
Affected
Claude Code 2.1.296, reproduced 2026-10-15
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun