-p
A Claude Code CLI flag, read out of the shipped bundle. No mined inventory carries it: everything below comes from what this site has written about it.
What it is
Print response without interactive mode (see [Agent SDK documentation](/docs/en/agent-sdk/overview) for programmatic usage details)
Anthropic's own wording. Read off CLI reference, captured 2026-08-28.
Presence across releases
The miner has never read a build containing this name. It is here because a changelog entry of ours names it, which is evidence that it existed and not evidence of which releases carried it. The inventory starts at v2.1.138 and everything older than that was never mined.
Changelog entries naming it
-
v2.1.246Non-interactive runs retry a response that was cut off mid-stream
A cut-off streaming reply in claude -p is now retried automatically, asking the model to resume.
named in this entry
-
v2.1.239One shared test for whether a run is headless
One shared check now decides whether a run is non-interactive, covering print mode and piped output.
named in this entry
-
v2.1.239A
-pin an argument value no longer forces print modeA -p inside an argument value no longer silently switches you into print mode.
named in this entry
-
v2.1.238Print mode can reuse one engine across prompts
Set one variable and print mode keeps the model, tools and caches warm between prompts instead of rebuilding.
named in this entry
-
v2.1.223permission_denied events fire even without a permission prompt
Headless and SDK runs now report permission denials even when no prompt was ever shown.
named in this entry
-
v2.1.223New hidden CLI flag --resume-drops-turn
A hidden flag lets you declare which turn a truncating resume is meant to discard.
named in this entry
-
v2.1.221In non-interactive runs, built-in help and feedback no longer reserve those command names
You can name a plugin or custom command help or feedback and it will work in claude -p runs.
named in this entry
-
v2.1.219Headless text output recovers the last full assistant message on an incomplete run
In headless text runs, an incomplete ending no longer swallows the last full answer.
named in this entry
Documentation pages
- CLI reference reference table Claude Code CLI
A reference table page is one whose own table defines this name, and it is where the description above came from. A page that mentions it carries the name somewhere in its text and may say nothing about it at all. Every page carrying it.
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the CLI flag does. All CLI flags.