Answer: You cannot change the system prompt of an existing session directly; Claude Code records the system prompt on a session's first request and reuses that record until the session is compacted, so a new prompt takes effect only after compaction or in a new session. To update instructions mid-session, send the new instructions in the next user message or return additionalContext from a UserPromptSubmit or PostToolUse hook. Status: Confirmed Entry: tool/claude-code/agents-and-automation/change-system-prompt-existing-session Revision: 3 Digest: sha256:080f2e65dc39f7ef (changes whenever the content changes) Timeline: Created: 2026-11-13T03:02:49Z Last changed: 2026-11-18T12:12:39Z (minimum Python SDK version: — → claude-agent-sdk` v0.2.153) Last verified: 2026-11-20T12:16:51Z Next check: 2026-11-21T12:16:51Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of default behavior | Claude Code records the system prompt on a session's first request and reuses that record until the session is compacted | [1] | 2026-11-20 when new text takes effect | The new text takes effect after that compaction, or in a new session | [1] | 2026-11-20 mid-session method 1 | include the new instructions in the next user message you send | [1] | 2026-11-20 mid-session method 2 | return [`additionalContext`] | [1] | 2026-11-20 snapshot setting | set `snapshot` to false on the object form of the system prompt | [1] | 2026-11-20 minimum TypeScript SDK version | @anthropic-ai/claude-agent-sdk` v0.3.257 | [1] | 2026-11-20 minimum Python SDK version | claude-agent-sdk` v0.2.153 | [1] | 2026-11-20 Sources: [1] Anthropic. "Modifying system prompts". https://code.claude.com/docs/en/agent-sdk/modifying-system-prompts.md Role: primary. Accessed: 2026-11-20T12:16:51Z Quote: "Claude Code records the system prompt on a session's first request and reuses that record until the session is compacted" (Supports: default behavior) Quote: "The new text takes effect after that compaction, or in a new session." (Supports: when new text takes effect) Quote: "include the new instructions in the next user message you send" (Supports: mid-session method 1) Quote: "return [`additionalContext`](https://code.claude.com/docs/en/hooks#add-context-for-claude) from a `UserPromptSubmit` or `PostToolUse`" (Supports: mid-session method 2) Quote: "set `snapshot` to false on the object form of the system prompt" (Supports: snapshot setting) Quote: "requires `@anthropic-ai/claude-agent-sdk` v0.3.257 or later" (Supports: minimum TypeScript SDK version) Quote: "or `claude-agent-sdk` v0.2.153 or later" (Supports: minimum Python SDK version) Published: 2026-11-20T03:10:57Z Snapshot SHA-256: 34d99ce0a9340cdc69bb3a7447e8cd359719eb03d1419675c49c388772fa8f2c (captured 2026-11-17T12:20:52Z) 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]. On this check the text of [1] was unchanged since 2026-11-17T12:20:54Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:16:51Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:16:51Z Last attempt: 2026-11-20T12:16:51Z Notes and limitations: Extracted automatically from a single official source (section "Change the prompt of an existing session"). Related: https://latestn.com/tool/claude-code/agents-and-automation/check-running-agent-work How do I check on work that Claude Code agents are running in the background? https://latestn.com/tool/claude-code/agents-and-automation/choose-and-weight-graders What grader types exist for Claude Code plugin evals and how do I choose and weight graders? https://latestn.com/tool/claude-code/agents-and-automation/choose-display-mode How do I choose the display mode for my Claude Code agent team? https://latestn.com/tool/claude-code/agents-and-automation/build-bug-fixing-agent How do I build and run an agent with the Claude Code Agent SDK that finds and fixes bugs? https://latestn.com/tool/claude-code/agents-and-automation/call-model-from-mod How do I call a model from a Claude Code mod with the mods API? https://latestn.com/tool/claude-code/agents-and-automation/capture-session-id How do I capture the session ID in Claude Code SDK? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-18T12:12:39Z | changed | minimum Python SDK version: — → claude-agent-sdk` v0.2.153 | [1] 2026-11-18T12:12:39Z | changed | minimum TypeScript SDK version: — → @anthropic-ai/claude-agent-sdk` v0.3.257 | [1] 2026-11-18T12:12:39Z | changed | mid-session method 2: — → return [`additionalContext`] | [1] 2026-11-18T12:12:39Z | changed | mid-session method 1: — → include the new instructions in the next user message you send | [1] 2026-11-18T12:12:39Z | changed | Python SDK version: v0.2.153 → — | [1] 2026-11-18T12:12:39Z | changed | TypeScript SDK version: v0.3.257 → — | [1] 2026-11-18T12:12:39Z | changed | mid-session alternative: send the new instructions in the conversation instead of changing `systemPrompt` → — | [1] 2026-11-15T12:16:18Z | changed | Python SDK version: — → v0.2.153 | [1] 2026-11-15T12:16:18Z | changed | TypeScript SDK version: — → v0.3.257 | [1] 2026-11-15T12:16:18Z | changed | mid-session alternative: — → send the new instructions in the conversation instead of changing `systemPrompt` | [1] 2026-11-15T12:16:18Z | changed | minimum Python SDK version: claude-agent-sdk` v0.2.153 or later → — | [1] 2026-11-15T12:16:18Z | changed | minimum TypeScript SDK version: @anthropic-ai/claude-agent-sdk` v0.3.257 or later → — | [1] 2026-11-15T12:16:18Z | changed | hook method: return [`additionalContext`](https://code.claude.com/docs/en/hooks#add-context-for-claude) from a `UserPromptSubmit` or `PostToolUse` [hook callback] → — | [1] 2026-11-15T12:16:18Z | changed | mid-session method: send the new instructions in the conversation instead of changing `systemPrompt` → — | [1] 2026-11-13T03:02:49Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/agents-and-automation/change-system-prompt-existing-session/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/change-system-prompt-existing-session POST: https://latestn.com/dispute/tool/claude-code/agents-and-automation/change-system-prompt-existing-session with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/agents-and-automation/change-system-prompt-existing-session?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I change the system prompt of an existing Claude Code session? Revision 3, last verified 2026-11-20T12:16:51Z. https://latestn.com/tool/claude-code/agents-and-automation/change-system-prompt-existing-session (accessed 2026-11-21T10:07:28Z). @misc{LatestN_tool_claude_code_agents_and_automation_change_system_prompt_existing_session_r3, title = {How do I change the system prompt of an existing Claude Code session?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/agents-and-automation/change-system-prompt-existing-session}}, note = {Revision 3; digest sha256:080f2e65dc39f7ef; last verified 2026-11-20T12:16:51Z; accessed 2026-11-21T10:07:28Z} } 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/change-system-prompt-existing-session