Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

-p

cli never mined documented JSON

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.

First seen — never in a mined build
Last seen — never in a mined build
Builds0 / 149on this box, as of v2.1.308
Written about v0.2.117 first named in a changelog, 17 May 2025

In the changelogs

53

Releases whose published page names -p.

  1. v2.1.305
    claude -p keeps waiting for background shells a built-in plugin holds

    A built-in plugin can now make claude -p wait for a background shell before it exits

    named in this entry

  2. v2.1.304
    --json-schema help now says it only works with --print

    The help text for --json-schema now notes that it only works together with --print

    found in this entry's text, named in this entry

  3. 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

  4. 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

  5. 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

  6. v2.1.287
    Claude Code recognises --cloud used with --attach-serve when loading settings

    Starting with --cloud or --remote plus --attach-serve, and without -p, now changes how some settings sources are treated

    found in this entry's text, named in this entry

  7. v2.1.286
    Resuming in --print mode always runs its cleanup step

    When a session is resumed in --print mode with an SDK connection, Claude Code now runs its cleanup step at the end even if something fails

    found in this entry's text, named in this entry

  8. v2.1.285
    Changed list of startup flags Claude Code singles out

    Claude Code now keeps a set of startup flags, including --print, --background and --version, that it treats as a group

    found in this entry's text

  9. 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

  10. v2.1.281
    New SDK pre-warmed spare process: --await-claim plus claim_session control request

    A hidden --await-claim option lets an SDK host start a spare Claude Code process early and bind it to a session later

    found in this entry's text

  11. v2.1.281
    Hidden claude -p --cloud headless cloud-print path added, but compiled off

    Code for a headless claude -p --cloud run is added, but the switch that enables it returns false, so no one can use it in 2.1.281

    found in this entry's text

  12. 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

  13. 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

  14. v2.1.281
    --no-session-persistence check moved earlier and now applied immediately

    --no-session-persistence is checked earlier and takes effect at once, and --managed-settings and setting sources are passed to child processes

    found in this entry's text, named in this entry

  15. 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

  16. 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

  17. 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

  18. 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

  19. 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

  20. 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

  21. 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

  22. 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

  23. 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

  24. v2.1.259
    New --permission-prompts host|none CLI/SDK option to silently auto-deny prompts

    A new --permission-prompts option lets print sessions auto-deny anything that would prompt instead of asking the host.

    found in this entry's text

  25. 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

  26. 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

  27. 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

  28. 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

  29. v2.1.242
    --print with --cloud can message an existing cloud session

    You can now use --print with --cloud to message an existing cloud session.

    named in this entry, found in this entry's text

  30. 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

  31. 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

  32. v2.1.239
    A -p in an argument value no longer forces print mode

    A -p inside an argument value no longer silently switches you into print mode.

    found in this entry's text, named in this entry

  33. 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

  34. v2.1.229
    A whitespace-only prompt gets its own error

    A prompt of only spaces to --print now gets its own clear error.

    named in this entry, found in this entry's text

  35. 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

  36. 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

  37. 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

  38. 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

  39. v2.1.211
    --forward-subagent-text CLI Flag

    found in this entry's text

  40. v2.1.205
    --append-subagent-system-prompt flag

    found in this entry's text

  41. v2.1.198
  42. v2.1.181
  43. v2.1.174

    found in this entry's text

  44. v2.1.118
    --plan-mode-instructions CLI Flag

    found in this entry's text

  45. v2.1.101
    Resume Sessions by Title

    found in this entry's text

  46. v2.1.79
    SIGINT Handling in Print Mode

    found in this entry's text

  47. v2.1.71
    --workload CLI Flag

    found in this entry's text

  48. v2.1.69
    --prefill CLI Flag

    found in this entry's text

  49. v2.0.24
    Optimized SDK Performance

    found in this entry's text

  50. v1.0.63
    Better Error Handling in Print Mode

    found in this entry's text

  51. v1.0.62
    Fixed

    found in this entry's text

  52. v1.0.37
    Print Mode Support

    found in this entry's text

  53. v0.2.117
    Enhanced Print Mode (--print) 📄

    found in this entry's text

First cited

0

No 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

0

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.

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.

Feedback