The print mode has been significantly improved with new options:
Session Management:
--continue - Continue the most recent conversation--resume <session-id> - Resume a specific conversation by UUID
System Prompts:
Examples:
# Continue last conversation
claude --print --continue "What were we discussing?"
# Resume specific session
claude --print --resume 550e8400-e29b-41d4-a716-446655440000 "Let's continue"
# Custom system prompt
claude --print --system-prompt "You are a Python expert" "Write a sorting algorithm"
How sure we are
One source agrees One thing we can check says the same as this entry.
Anthropic's release notes agree Breaking change: --print JSON output now returns nested message objects, for forwards-compatibility as we introduce new metadata fields
See this entry in the whole of v0.2.117 →
Names in this entry
cli --print Print response without interactive mode (see Agent SDK documentation for programmatic usage details)
cli --continue Load the most recent conversation in the current directory, including a background session that has finished ; opening finished background sessions requires Claude Code v2.1.257 or later. Skips sessions created with claude -p or the Agent SDK, and sessions whose first prompt was /loop. claude -p --continue includes -p, SDK, and /loop sessions. Includes sessions that added this directory with /add-dir
cli --resume Resume a specific session by ID or name, or show an interactive picker to choose a session. In place of an ID, you can pass the absolute path to a session's .jsonl transcript file . The picker and name search include sessions that added this directory with /add-dir. When you pass a session ID, Claude Code searches the current project directory and its git worktrees, then every other project on this machine. Before v2.1.223, the ID search covered only the current project directory and its git worktrees. Background sessions appear in the picker marked with bg
cli --system-prompt Replace the entire system prompt with custom text
cli --append-system-prompt Append custom text to the end of the default system prompt
Anthropic's note
Upstream's own release notes for v0.2.117 name something this entry names, so the two are probably about the same change. Probably: the pairing is made on a shared name rather than on the words around it.
Breaking change: --print JSON output now returns nested message objects, for forwards-compatibility as we introduce new metadata fields
Is this right?
0
0
Feedback
What's wrong with this entry?
Hard to understand Too vague Looks wrong Not relevant to me Too long Missing the detail I wanted Duplicate of another card
Clear Learned something new I can act on this Good catch
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
← Previous · 3 of 9
Long-Running Command Handling 鈴憋笍
In v0.2.117 Changes release-page order
Next → · 5 of 9
Output Truncation