-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.
Also written --print. Every list on this page counts all of these spellings together.
Print response without interactive mode (see Agent SDK documentation for programmatic usage details)
Anthropic's own wording. Read off CLI reference, captured 2026-09-26.
In the changelogs
53Releases whose published page names -p.
-
v2.1.305
claude -pkeeps waiting for background shells a built-in plugin holdsA built-in plugin can now make
claude -pwait for a background shell before it exitsnamed in this entry
-
v2.1.304
--json-schemahelp now says it only works with--printThe help text for
--json-schemanow notes that it only works together with--printfound in this entry's text, named in this entry
-
v2.1.302
claude -p with --continue or --resume now exits on certain errors
In print mode, some failures while continuing or resuming a conversation now print the error and exit with code 1 instead of starting empty
named in this entry
-
v2.1.296
Resumed remote sessions stop instead of running without their saved state
When a resumed remote session cannot read its saved state, Claude Code now exits with an error instead of starting a turn with nothing
found in this entry's text, named in this entry
-
v2.1.290
Resuming with --resume and --print can append an attachment
When a resumed non-interactive session drops its last turn, Claude Code can now add an attachment entry instead of only trimming
found in this entry's text, named in this entry
-
v2.1.287
Claude Code recognises
--cloudused with--attach-servewhen loading settingsStarting with
--cloudor--remoteplus--attach-serve, and without-p, now changes how some settings sources are treatedfound in this entry's text, named in this entry
-
v2.1.286
Resuming in --print mode always runs its cleanup step
When a session is resumed in
--printmode with an SDK connection, Claude Code now runs its cleanup step at the end even if something failsfound in this entry's text, named in this entry
-
v2.1.285
Changed list of startup flags Claude Code singles out
Claude Code now keeps a set of startup flags, including
--print,--backgroundand--version, that it treats as a groupfound in this entry's text
-
v2.1.282
SDK output format checks now start only after the session goes idle
Sampled checks of SDK output against its expected format now wait until the first result is written and the session is idle
found in this entry's text, named in this entry
-
v2.1.281
New SDK pre-warmed spare process: --await-claim plus claim_session control request
A hidden
--await-claimoption lets an SDK host start a spare Claude Code process early and bind it to a session laterfound in this entry's text
-
v2.1.281
Hidden
claude -p --cloudheadless cloud-print path added, but compiled offCode for a headless
claude -p --cloudrun is added, but the switch that enables it returns false, so no one can use it in 2.1.281found in this entry's text
-
v2.1.281
--agents can now take a file path instead of inline JSON, but only in print mode
--agents now accepts a path to a file of subagent definitions, but only with --print (-p); interactive sessions still need inline JSON
found in this entry's text
-
v2.1.281
--bg rejects --agents given as a file
Using --bg with --agents pointing at a file now fails; pass the agents as inline JSON instead
found in this entry's text
-
v2.1.281
--no-session-persistence check moved earlier and now applied immediately
--no-session-persistenceis checked earlier and takes effect at once, and--managed-settingsand setting sources are passed to child processesfound in this entry's text, named in this entry
-
v2.1.274
Startup: fastMode/advisor settings sync extracted into shared helper
Headless startup's fastMode and advisor settings sync moved into shared helper functions
found in this entry's text
-
v2.1.274
Force-login-org / policy validation failures now get logged and reported with a reason
Failed org/policy validation during headless startup now gets logged with a reason
found in this entry's text
-
v2.1.274
CLI startup errors now carry a machine-readable startupFailureReason
Headless Claude Code errors now include a machine-readable startupFailureReason field like session_held_by_background
found in this entry's text
-
v2.1.268
Remote-session org-policy denials now emit telemetry
Blocked remote-session actions from org policy now emit a tengu_org_policy_denied telemetry event
found in this entry's text
-
v2.1.268
New num_turns-adjacent 'seq' field documented for stream-json results
Stream-json results from claude -p now document a 'seq' delivery-order field
named in this entry
-
v2.1.268
Print-mode resume gains cloud-session fork seed adoption and a hydration pass
Print-mode session resume can now pick up where a forked cloud session left off
found in this entry's text
-
v2.1.265
--fallback-model no longer claims to require --print
The --fallback-model CLI help no longer says it only works with --print
found in this entry's text
-
v2.1.261
MCP task-sidecar restore in --print mode is hard-gated off
MCP task-sidecar restore in print mode is hard-gated off unconditionally.
found in this entry's text, named in this entry
-
v2.1.260
--json-schema now warns on unusable schemas instead of failing silently
An unusable --json-schema now warns you with the specific problem instead of failing silently.
found in this entry's text
-
v2.1.259
New
--permission-prompts host|noneCLI/SDK option to silently auto-deny promptsA new --permission-prompts option lets print sessions auto-deny anything that would prompt instead of asking the host.
found in this entry's text
-
v2.1.257
print --continue now reports when a background session blocks resume
claude -p --continue now says a matching session is running in the background instead of silently finding nothing.
named in this entry
-
v2.1.251
Cloud sessions report why they failed to start
A cloud session that failed to start now shows the actual reason instead of a generic error.
named in this entry, found in this entry's text
-
v2.1.247
Resume can classify a turn that was interrupted at shutdown
Resuming now recognises a turn that was cut off when Claude Code shut down mid-tool.
found in this entry's text
-
v2.1.246
Non-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.242
--printwith--cloudcan message an existing cloud sessionYou can now use --print with --cloud to message an existing cloud session.
named in this entry, found in this entry's text
-
v2.1.239
Command-line flag parsing rewritten around an explicit table of value-taking flags
Flags that take values no longer swallow or drop their arguments, and
--is handled.found in this entry's text
-
v2.1.239
One 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, found in this entry's text
-
v2.1.239
A
-pin an argument value no longer forces print modeA -p inside an argument value no longer silently switches you into print mode.
found in this entry's text, named in this entry
-
v2.1.238
Print 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.229
A whitespace-only prompt gets its own error
A prompt of only spaces to
--printnow gets its own clear error.named in this entry, found in this entry's text
-
v2.1.223
permission_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.223
New 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.221
In 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.219
Headless 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
-
v2.1.211
--forward-subagent-textCLI Flagfound in this entry's text
-
v2.1.205
--append-subagent-system-promptflagfound in this entry's text
-
v2.1.198
--bgand--allow-toolsFlags forclaude agentsfound in this entry's text
-
v2.1.181
/config key=value— Set Settings from the Command Linefound in this entry's text
- v2.1.174
-
v2.1.118
--plan-mode-instructions CLI Flag
found in this entry's text
-
v2.1.101
Resume Sessions by Title
found in this entry's text
-
v2.1.79
SIGINT Handling in Print Mode
found in this entry's text
-
v2.1.71
--workloadCLI Flagfound in this entry's text
-
v2.1.69
--prefillCLI Flagfound in this entry's text
-
v2.0.24
Optimized SDK Performance
found in this entry's text
-
v1.0.63
Better Error Handling in Print Mode
found in this entry's text
-
v1.0.62
Fixed
found in this entry's text
-
v1.0.37
Print Mode Support
found in this entry's text
-
v0.2.117
Enhanced Print Mode (
--print) 📄found in this entry's text
First cited
0No release's published evidence quotes this name. The ledger indexes the Evidence lines of every changelog on this site, so this says nobody here has ever quoted it; it says nothing about how old the name is.
Presence across releases
0The 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.
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.