Answer: To enable Code Mode, set the CLAUDE_CODE_EXPERIMENTAL_CODE_MODE environment variable to 1, either in your shell or in your user settings (~/.claude/settings.json). You must be on version v2.1.323 or newer, and Claude Code will ask you to confirm before your first Code Mode session. Status: Confirmed Entry: tool/claude-code/features/enable-code-mode Revision: 2 Digest: sha256:b66caa43a9500303 (changes whenever the content changes) Timeline: Created: 2026-11-14T12:14:57Z Last changed: 2026-11-17T12:23:59Z (Confirmation option: — → Yes, turn on Code Mode) Last verified: 2026-11-20T12:19:14Z Next check: 2026-11-21T12:19:14Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Environment variable | CLAUDE_CODE_EXPERIMENTAL_CODE_MODE | [1] | 2026-11-20 Required value | 1 | [1] | 2026-11-20 Minimum version | v2.1.323 | [1] | 2026-11-20 Shell command (macOS, Linux, WSL) | CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 claude | [1] | 2026-11-20 Settings file | ~/.claude/settings.json | [1] | 2026-11-20 Confirmation option | Yes, turn on Code Mode | [1] | 2026-11-20 Sources: [1] Anthropic. "Run tool calls from code with Code Mode". https://code.claude.com/docs/en/code-mode.md Role: primary. Accessed: 2026-11-20T12:19:14Z Quote: "Set the [`CLAUDE_CODE_EXPERIMENTAL_CODE_MODE`](https://code.claude.com/docs/en/env-vars#variables) environment variable to `1`." (Supports: Environment variable) Quote: "environment variable to `1`" (Supports: Required value) Quote: "If the version is older than v2.1.323, run `claude update`." (Supports: Minimum version) Quote: "CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 claude" (Supports: Shell command (macOS, Linux, WSL)) Quote: "Save this `env` block in `~/.claude/settings.json` and start `claude`:" (Supports: Settings file) Quote: "Select **Yes, turn on Code Mode**." (Supports: Confirmation option) Published: 2026-11-20T10:27:04Z Snapshot SHA-256: 4da2373f8efd0add442cbcbf7b2a507d0175df8c1f68be8cc3a782a5f7e030bf (captured 2026-11-20T12:19: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:19:14Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:19:14Z Last attempt: 2026-11-20T12:19:14Z Notes and limitations: Extracted automatically from a single official source (section "Try Code Mode"). Related: https://latestn.com/tool/claude-code/features/enable-computer-use How do I enable computer use in Claude Code Desktop? https://latestn.com/tool/claude-code/features/enable-computer-use-cli How do I enable computer use in the Claude Code CLI? https://latestn.com/tool/claude-code/features/enable-voice-dictation How do I enable voice dictation in Claude Code? https://latestn.com/tool/claude-code/features/disable-advisor-tool How do I turn the advisor off in Claude Code? https://latestn.com/tool/claude-code/features/effective-prompt-patterns What patterns make Claude Code prompts more effective? https://latestn.com/tool/claude-code/features/enable-advisor-tool How do I enable the advisor tool in Claude Code? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-17T12:23:59Z | changed | Confirmation option: — → Yes, turn on Code Mode | [1] 2026-11-17T12:23:59Z | changed | Confirmation prompt: Yes, turn on Code Mode → — | [1] 2026-11-14T12:14:57Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/features/enable-code-mode/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/features/enable-code-mode POST: https://latestn.com/dispute/tool/claude-code/features/enable-code-mode with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/features/enable-code-mode?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I enable Code Mode in Claude Code? Revision 2, last verified 2026-11-20T12:19:14Z. https://latestn.com/tool/claude-code/features/enable-code-mode (accessed 2026-11-21T09:50:32Z). @misc{LatestN_tool_claude_code_features_enable_code_mode_r2, title = {How do I enable Code Mode in Claude Code?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/features/enable-code-mode}}, note = {Revision 2; digest sha256:b66caa43a9500303; last verified 2026-11-20T12:19:14Z; accessed 2026-11-21T09:50:32Z} } 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/features/enable-code-mode