Unclear It is not stated whether setting the variable is enough on its own, since a server-side check also decides who is eligible.
Claude 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.
Claude Code can refuse the request. Reasons include:
- an administrator's managed policy blocks it
- the variable has a value it does not accept
- your own settings rule it out
- OpenTelemetry export is in use or compliance settings apply
- you use a provider other than Anthropic's own
- the model in use is not supported
When 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.
Two 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.
This 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.
tengu_rustling_blossom Not enough to sayNothing here resolved what this flag was doing on this version, so nothing here should be read as on or off.
This account: no value returned · anonymous baseline: no value returned · compiled default in v2.1.318: 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.
Read once, for one account on one subscription tier, against v2.1.318. It isn't a statement about your account. What a flag value here can and cannot tell you
A reading is one sample. Claude Code evaluates its flags remotely, so no client sees the targeting rule behind a value and this says nothing about your account.
It is not stated whether setting the variable is enough on its own, since a server-side check also decides who is eligible.