brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: claude --safe-mode starts Claude Code without your customisations

Claude
~/tips/tip-claude-code-safe-mode

claude --safe-mode

Starts Claude Code without hooks, skills, plugins, MCP servers or CLAUDE.md, to see whether your setup causes a problem.

When Claude Code acts up, I want to know whether my own setup causes it. One flag takes the setup out of the picture so I can look again.

--safe-mode starts a session with all customisations disabled. The CLI reference describes it as a way to troubleshoot a broken configuration.

claude --safe-mode

In that session CLAUDE.md, skills, plugins, hooks, MCP servers, custom commands and agents, output styles, workflows, custom themes and keybindings, the status line, file-suggestion commands, LSP servers and auto memory do not load. Authentication, model selection, built-in tools and permissions work as usual. That is where it differs from --bare, a minimal mode that skips auto-discovery of hooks, skills, plugins, MCP servers, auto memory and CLAUDE.md so scripted calls start faster.

The test is simple. Reproduce the problem in a normal session, then try again with claude --safe-mode. If it still happens, your setup is not the cause. If it is gone, add things back one at a time, hooks and MCP servers first, until the problem returns. The reference also names a second use: checking whether a customisation triggers automatic model fallback.

The flag sets the environment variable CLAUDE_CODE_SAFE_MODE.

Managed settings policy still applies in safe mode, including policy-configured hooks, status line and file-suggestion commands. A problem that comes from such a policy survives the test.

Further reading: Claude Code CLI reference

More Claude tips /recap /focus /skill-doctor /autocompact 500k claude purge ~/work/my-repo --dry-run All Claude tips (83) All topics

Link