What
Restricted sessions no longer write auto-memory. The eligibility check bails out before it even looks at CLAUDE_CODE_DISABLE_AUTO_MEMORY.
Details
- Triggered by the same option behind the
--restrictedargument that Claude Code passes to its own child sessions, along with theCLAUDE_CODE_RESTRICTED: "1"environment variable it forwards. - Defaults to false, so ordinary sessions are unaffected.
Evidence
CLAUDE_CODE_DISABLE_AUTO_MEMORY
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed since
Anthropic's documentation has since written up --restricted, on Tools reference.
* A permissions [deny rule](/docs/en/permissions#match-all-uses-of-a-tool), the `--disallowedTools` flag, or [`--restricted`](/docs/en/cli-reference#cli-flags) removes `Bash` from the session.tools-reference see the edit
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up --restricted, on Tools reference.
Anthropic's release notes agree
Added --restricted (or CLAUDE_CODE_RESTRICTED=1): removes the built-in tools that run commands or code and WebFetch (unless named in…
The name it cites is new in this build
New in this build: --restricted