Claude Corner
Claude Code Acting Strange After a Setup Change? Start It in Safe Mode.
By Steven Sorensen ยท 20 Nov 2026

At a glance
- One flag,
--safe-mode, starts Claude Code with your customizations switched off so you can test without them. - If the problem disappears, the cause sits in your CLAUDE.md, skills, plugins, hooks, MCP servers or other custom files.
- If it stays, the docs walk you through a clean configuration test before you edit files.
Here is an example, not a case from the docs: you added a plugin and a hook, and now Claude ignores an instruction or a tool vanishes. Commenting out files one by one is slow. Claude Code can switch your setup off so you can tell whether the problem lives there.
Why it matters
Anthropic's guide to debugging your configuration says the usual cause is that a file did not load, loaded from a different place than expected, or was overridden by another file. To rule your setup in or out, start with claude --safe-mode, which launches a session with customizations disabled. Authentication, model selection, built in tools and permissions keep working, so it still feels like Claude Code. If the problem goes away, you have narrowed it to something safe mode turned off.
How to test your setup with safe mode
We built these steps from the docs and have not run them live.
- From your project folder, run
claude doctor. It prints read only installation and settings diagnostics without starting a session, and catches invalid settings files. - Start a session with
claude --safe-modein the same folder. CLAUDE.md, skills, plugins, hooks, MCP servers, custom commands and agents, output styles, custom keybindings and auto memory do not load. - Repeat what went wrong, with the same prompt or command.
- If the problem is gone, exit and start a normal session with
claude. Run/contextfor CLAUDE.md, rules and skills,/mcpfor servers or/hooksfor hooks. - If the problem is still there in safe mode, follow the clean configuration test on the same docs page, which starts Claude Code from an empty folder with a fresh configuration directory. If it follows you there, run
/statusfor managed settings.
# We have not run this script end to end on every platform.
# Run these one line at a time from your project folder. None of them edits files.
# Read only installation and settings check, no session
claude doctor
# Start a session with customizations turned off
claude --safe-mode
# Repeat the problem, then exit and start a normal session
claude
# Then, in Claude Code, type the matching check, one at a time:
# /context
# /mcp
# /hooks
# /status
Gotchas
- Your organization's policy still applies. Safe mode keeps managed settings policy, including policy configured hooks. Managed plugins, skills, CLAUDE.md and policy MCP servers are turned off.
- Permission problems will not go away. Permissions work normally in safe mode, so a blocked or allowed tool call behaves the same. Run
/permissionsin a normal session to see allow and deny rules. - A loaded file can still be ignored. If
/contextshows your CLAUDE.md but Claude still skips a rule, the docs point to how the rule is written. Vague instructions, conflicting files and very long files lower adherence. - No restart after the fix. When you edit
settings.json, the running session picks up the change after a brief delay.
If a hook is the culprit, see Formatting Nits on Every Claude Diff? Let a Hook Run Prettier After Each Edit.
Sources:
- Debug your configuration, Claude Code docs
- CLI reference, Claude Code docs
- Formatting Nits on Every Claude Diff? Let a Hook Run Prettier After Each Edit.
Recommended AI prompt
Copy this paragraph into ChatGPT, Claude, Gemini, Grok, or whatever AI you use.
Using only Anthropic's Claude Code docs on debugging your configuration and the CLI reference, give a short plan that starts with claude doctor, then a safe mode session where I repeat the problem, then the right check in a normal session if it disappeared, and what to try if it did not. Ask what changed in my setup and what goes wrong.