Answer: Use `--continue` to continue the most recent conversation, or `--resume` with a session ID to continue a specific conversation. Status: Confirmed Entry: tool/claude-code/agents-and-automation/continue-conversations Revision: 3 Digest: sha256:c1dbc687f37e8b62 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:04:21Z Last changed: 2026-11-17T12:26:25Z (version: — → v2.1.257) Last verified: 2026-11-20T12:21:14Z Next check: 2026-11-21T12:21:14Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of continue flag | --continue | [1] | 2026-11-20 resume flag | --resume | [1] | 2026-11-20 version | v2.1.257 | [1] | 2026-11-20 Sources: [1] Anthropic. "Run Claude Code programmatically". https://code.claude.com/docs/en/headless.md Role: primary. Accessed: 2026-11-20T12:21:14Z Quote: "Use `--continue` to continue the most recent conversation" (Supports: continue flag) Quote: "or `--resume` with a session ID to continue a specific conversation" (Supports: resume flag) Quote: "On Claude Code v2.1.257 or later, when you pass `--continue`" (Supports: version) Published: 2026-11-20T02:53:01Z Snapshot SHA-256: eae22eba29efbd00b5b2592bd64774ffd337ad0efe7645c4c842954c2d9cbcdd (captured 2026-11-20T12:21:14Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T12:21:14Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:21:14Z Last attempt: 2026-11-20T12:21:14Z Notes and limitations: Extracted automatically from a single official source (section "Continue conversations"). Related: https://latestn.com/tool/claude-code/agents-and-automation/control-turns-and-budget How do I control how many turns or budget a Claude Code agent loop runs? https://latestn.com/tool/claude-code/agents-and-automation/create-custom-subagent How do I create a custom subagent in Claude Code? https://latestn.com/tool/claude-code/agents-and-automation/create-custom-tool How do I create a custom tool for Claude Code using the Agent SDK? https://latestn.com/tool/claude-code/agents-and-automation/claudesdkclient-interrupts How do I interrupt a running Claude Code session with ClaudeSDKClient in Python? https://latestn.com/tool/claude-code/agents-and-automation/configure-hooks How do I configure hooks in Claude Code to intercept tool calls? https://latestn.com/tool/claude-code/agents-and-automation/configure-tool-search How do I configure tool search in Claude Code? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-17T12:26:25Z | changed | version: — → v2.1.257 | [1] 2026-11-17T12:26:25Z | changed | version for background session behavior: v2.1.257 → — | [1] 2026-11-15T12:21:13Z | changed | version for background session behavior: — → v2.1.257 | [1] 2026-11-15T12:21:13Z | changed | version: v2.1.257 → — | [1] 2026-11-13T03:04:21Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/agents-and-automation/continue-conversations/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/agents-and-automation/continue-conversations POST: https://latestn.com/dispute/tool/claude-code/agents-and-automation/continue-conversations with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/agents-and-automation/continue-conversations?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I continue a conversation when running Claude Code programmatically? Revision 3, last verified 2026-11-20T12:21:14Z. https://latestn.com/tool/claude-code/agents-and-automation/continue-conversations (accessed 2026-11-21T09:57:23Z). @misc{LatestN_tool_claude_code_agents_and_automation_continue_conversations_r3, title = {How do I continue a conversation when running Claude Code programmatically?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/agents-and-automation/continue-conversations}}, note = {Revision 3; digest sha256:c1dbc687f37e8b62; last verified 2026-11-20T12:21:14Z; accessed 2026-11-21T09:57:23Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/agents-and-automation/continue-conversations