--safe-mode vs --restricted
People think --safe-mode and --restricted are both a locked-down mode, and they are not. --safe-mode turns off your add-ons, such as skills, plugins and hooks, to find the one that causes a fault. Your tools still work. --restricted is for a test harness on a shared machine. It takes away the tools that run commands. It reads only managed settings and what --settings passes.
--safe-mode Flag
It starts Claude Code with your add-ons turned off.
--safe-mode starts Claude Code with your add-ons turned off. Then you can find what is breaking it. CLAUDE.md, skills, plugins, hooks, MCP servers, custom commands and agents, themes, the status line and auto memory do not load. Sign-in, the model, built-in tools and permissions still work. Your admin's settings still apply.
--restricted Flag
It starts a locked session for a shared box.
--restricted starts a locked-down session, for a test harness on a shared machine. It removes the tools that run commands or code, and WebFetch, unless you name each one in --tools. File tools stay inside the working folders. It reads only managed settings and --settings, and refuses bypass mode and cloud sessions. It needs Claude Code 2.1.248 or later.
In one line
- --safe-mode Flag
- It starts Claude Code with your add-ons turned off.
- --restricted Flag
- It starts a locked session for a shared box.