Skip to content
BENIBIX Learn

--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.

AI⌨️ Claude Code

--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.

Example
Since Monday, Lucy's sessions crash on start. With --safe-mode it starts fine, so she turns her plugins back on one at a time and finds the bad one.
Why it matters
It splits the problem in two: Claude Code itself, or something you added to it.
Full entry
AI⌨️ Claude Code

--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.

Example
Emma's team scores models on a shared server. Each run uses --restricted, so Claude cannot run commands or read anyone's settings on that box.
Why it matters
A shared machine stays safe even when the prompt asks for something it should not.
Full entry

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.