{"name":"-p","slug":"p","family":"cli","title":"CLI flags","noun":"CLI flag","description":"Print response without interactive mode (see [Agent SDK documentation](\/docs\/en\/agent-sdk\/overview) for programmatic usage details)","description_source":"docs","described_by":{"doc":"claude-code\/cli-reference","title":"CLI reference"},"presence":{"first_seen":null,"removed_in":null,"in_current_build":false,"newest_mined":"2.1.308","builds":0,"mined_builds":149,"first_cited":null},"aliases":["--print"],"entries":[{"version":"2.1.305","anchor":"claude-p-waits-on-background-shells-that-built-in-plugins-h","heading":"claude -p keeps waiting for background shells a built-in plugin holds","line":"A built-in plugin can now make `claude -p` wait for a background shell before it exits","released_at":"2026-10-20 19:29:36","reason":"named in this entry"},{"version":"2.1.304","anchor":"json-schema-help-says-it-only-works-with-print","heading":"--json-schema help now says it only works with --print","line":"The help text for `--json-schema` now notes that it only works together with `--print`","released_at":"2026-10-19 19:47:15","reason":"found in this entry's text, named in this entry"},{"version":"2.1.302","anchor":"claude-p-continue-resume-now-aborts-on-a-specific-error","heading":"claude -p with --continue or --resume now exits on certain errors","line":"In print mode, some failures while continuing or resuming a conversation now print the error and exit with code 1 instead of starting empty","released_at":"2026-10-16 16:48:28","reason":"named in this entry"},{"version":"2.1.296","anchor":"remote-worker-refuses-to-start-a-turn-when-stored-session-st","heading":"Resumed remote sessions stop instead of running without their saved state","line":"When a resumed remote session cannot read its saved state, Claude Code now exits with an error instead of starting a turn with nothing","released_at":"2026-10-09 16:58:10","reason":"found in this entry's text, named in this entry"},{"version":"2.1.290","anchor":"resume-with-resume-print-drop-turn-guard-adds-an-attach","heading":"Resuming with --resume and --print can append an attachment","line":"When a resumed non-interactive session drops its last turn, Claude Code can now add an attachment entry instead of only trimming","released_at":"2026-10-05 18:12:44","reason":"found in this entry's text, named in this entry"},{"version":"2.1.287","anchor":"cloud-remote-now-checked-together-with-attach-serve-an","heading":"Claude Code recognises --cloud used with --attach-serve when loading settings","line":"Starting with `--cloud` or `--remote` plus `--attach-serve`, and without `-p`, now changes how some settings sources are treated","released_at":"2026-10-01 16:59:25","reason":"found in this entry's text, named in this entry"},{"version":"2.1.286","anchor":"print-resume-now-runs-cleanup-in-a-finally-block-and-pass","heading":"Resuming in --print mode always runs its cleanup step","line":"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","released_at":"2026-09-30 17:14:38","reason":"found in this entry's text, named in this entry"},{"version":"2.1.285","anchor":"headless-cli-argument-classification-list","heading":"Changed list of startup flags Claude Code singles out","line":"Claude Code now keeps a set of startup flags, including `--print`, `--background` and `--version`, that it treats as a group","released_at":"2026-09-29 17:32:09","reason":"found in this entry's text"},{"version":"2.1.282","anchor":"sdk-output-schema-validation-is-now-built-lazily-on-an-idle","heading":"SDK output format checks now start only after the session goes idle","line":"Sampled checks of SDK output against its expected format now wait until the first result is written and the session is idle","released_at":"2026-09-24 15:56:22","reason":"found in this entry's text, named in this entry"},{"version":"2.1.281","anchor":"new-sdk-pre-warmed-spare-process-await-claim-plus-claim-s","heading":"New SDK pre-warmed spare process: --await-claim plus claim_session control request","line":"A hidden `--await-claim` option lets an SDK host start a spare Claude Code process early and bind it to a session later","released_at":"2026-09-23 17:01:17","reason":"found in this entry's text"}],"entries_total":53,"docs":[{"source":"claude-code","path":"cli-reference","title":"CLI reference","documented":true},{"source":"claude-code","path":"agent-view","title":"Manage multiple agents with agent view","documented":false},{"source":"claude-code","path":"desktop","title":"Desktop application","documented":false},{"source":"claude-code","path":"desktop-linux","title":"Claude Desktop on Linux (beta)","documented":false},{"source":"claude-code","path":"errors","title":"Error reference","documented":false},{"source":"claude-code","path":"glossary","title":"Glossary","documented":false},{"source":"claude-code","path":"headless","title":"Run Claude Code programmatically","documented":false},{"source":"claude-code","path":"model-config","title":"Model configuration","documented":false},{"source":"mcp","path":"docs\/2026-07-28\/tools\/inspector\/authorization","title":"Authorization","documented":false},{"source":"mcp","path":"docs\/2026-07-28\/tools\/inspector\/cli","title":"CLI client","documented":false}],"docs_total":13,"gates":[],"related":[],"url":"https:\/\/changelogs.core-directive.com\/reference\/cli\/p","family_url":"https:\/\/changelogs.core-directive.com\/reference\/cli.json"}