What
A new opt-in mode that disables all per-user and per-project customizations for a session. Designed for troubleshooting when Claude Code behaves unexpectedly and you want to isolate whether a plugin, hook, or CLAUDE.md is the cause.
Usage
claude --safe-mode
# or
CLAUDE_CODE_SAFE_MODE=1 claudeDetails
Disables: CLAUDE.md, skills, plugins, plugin hooks, MCP servers (auto-discovered and claude.ai), custom agents, output styles, workflows, custom themes, and custom keybindings Managed policy settings and hooks (from your organization's policy) still apply The UI surfaces a warning banner so you know safe mode is active Settings dialogs show "disabled in safe mode" labels next to affected options To exit safe mode: remove the flag or unset the env var and restart (claude will tell you which applies) The --agents flag is silently ignored in safe mode (user-supplied agents are disabled) Evidence
Safe mode toggle (search for "CLAUDE_CODE_SAFE_MODE " and "--safe-mode ") — C9() function at line ~3884
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
How sure we are
One source agrees One thing we can check says the same as this entry.
Anthropic's release notes agree Added --safe-mode flag (and CLAUDE_CODE_SAFE_MODE) to start Claude Code with all customizations (CLAUDE.md, plugins, skills, hooks, MCP…
See this entry in the whole of v2.1.169 →
Names in this entry
cli --safe-mode Start with all customizations disabled to troubleshoot a broken configuration: CLAUDE.md, skills, plugins, hooks, MCP servers, custom commands and agents, output styles, workflows, custom themes, custom keybindings, status line and file-suggestion commands, LSP servers, and auto memory do not load. Authentication, model selection, built-in tools, and permissions work normally, which differs from --bare . Managed settings policy still applies, including policy-configured hooks, status line, and file-suggestion commands; managed plugins, managed skills, managed CLAUDE.md, and policy-configured MCP servers do not. Useful for checking whether a customization is what triggers automatic model fallback . Sets CLAUDE_CODE_SAFE_MODE
env CLAUDE_CODE_SAFE_MODE Setting CLAUDE_CODE_RESTRICT_PERSONAL_CONFIG starts a session that restricts your own Claude Code files, alongside the other restricted modes
cli --agents Define custom subagents dynamically via JSON. Accepts the fields listed for CLI-defined subagents . With --print, the value can instead be the path to a JSON file holding the object; the file form requires Claude Code v2.1.281 or later. Claude Code validates the value at startup and exits on an invalid one; see Invalid --agents configuration for the message and for the flags and environment variable that skip the validation. Validation requires Claude Code v2.1.242 or later
Anthropic's note
Upstream's own release notes for v2.1.169 name something this entry names, so the two are probably about the same change. Probably: the pairing is made on a shared name rather than on the words around it.
Added --safe-mode flag (and CLAUDE_CODE_SAFE_MODE ) to start Claude Code with all customizations (CLAUDE.md, plugins, skills, hooks, MCP servers) disabled for troubleshooting
Is this right?
0
0
Feedback
What's wrong with this entry?
Hard to understand Too vague Looks wrong Not relevant to me Too long Missing the detail I wanted Duplicate of another card
Clear Learned something new I can act on this Good catch
In v2.1.169 Changes release-page order
Next → · 2 of 19
/design-sync Skill — Sync React Design Systems to Claude Design