{"version":"2.1.318","anchor":"experimental-code-mode-repl-env-vars-added-with-restart-h","canonical_anchor":"experimental-code-mode-repl-env-vars-added-with-restart-h","heading":"Experimental Code Mode can be requested with an environment variable","tier":"use","area":"Code Mode","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318\/e\/experimental-code-mode-repl-env-vars-added-with-restart-h","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318","markdown":"### Experimental Code Mode can be requested with an environment variable\n\nSetting `CLAUDE_CODE_EXPERIMENTAL_CODE_MODE` asks Claude Code to switch on an experimental Code Mode, which it can refuse for several reasons\n\n**Unclear.** It is not stated whether setting the variable is enough on its own, since a server-side check also decides who is eligible.\n\n**What**\n\nClaude Code has an experimental Code Mode. In it, Claude works through a tool called `REPL` (also reachable as `Eval`); a REPL is a place where code is typed and run one piece at a time. You ask for it by setting the environment variable `CLAUDE_CODE_EXPERIMENTAL_CODE_MODE` (a value set in your shell before starting Claude Code). At startup Claude Code checks the variable and decides whether to turn the mode on. If you did not ask, it records that you were not asked.\n\nClaude Code can refuse the request. Reasons include:\n\n- an administrator's managed policy blocks it\n\n- the variable has a value it does not accept\n\n- your own settings rule it out\n\n- OpenTelemetry export is in use or compliance settings apply\n\n- you use a provider other than Anthropic's own\n\n- the model in use is not supported\n\nWhen it refuses in non-interactive text output, it prints a line starting with `Warning:` to the error output. Eligibility also depends on a check sent from Anthropic's servers.\n\nTwo more variables, `CLAUDE_CODE_EXPERIMENTAL_CODE_MODE_RESTART` and `CLAUDE_CODE_EXPERIMENTAL_CODE_MODE_RESTARTED_FROM`, carry the choice across when Claude Code restarts itself. Each session now remembers its code mode, and resuming a session that refuses the mode is recorded. Permission prompts and denials now recognise script input as its own kind.\n\n**Why**\n\nThis is a new, scripting-style way for Claude to work that you can opt into with an environment variable. Because it can be refused, check for the warning line if the mode does not appear to start.\n\n- Flag `tengu_rustling_blossom`: Not enough to say (read for one account on one subscription tier against v2.1.318; this account: no value returned, anonymous baseline: no value returned, compiled default: off) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.\n- Area: Code Mode\n- Tier: Use it now\n- Useful: 5\/5\n- Signal: 5\/5\n- Scope: individual\n- Heads-up: no"}