Safe Mode (--safe-mode / CLAUDE_CODE_SAFE_MODE)#
What's wrong with this entry?
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.
claude --safe-mode
# or
CLAUDE_CODE_SAFE_MODE=1 claude- 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 (
claudewill tell you which applies) - The
--agentsflag is silently ignored in safe mode (user-supplied agents are disabled)
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.