Claude Code Restricted Mode
A launch flag that strips Claude Code down to reading and writing files in one folder, with no ability to run commands.
Details
- Starting with --restricted, or setting CLAUDE_CODE_RESTRICTED=1, removes the built-in tools that run commands or code, and removes WebFetch unless you name it in --tools
- File tools stay available but cannot reach outside the working directory
- The mode refuses bypassPermissions and ignores user, project, and local settings files, so nothing already on the machine can widen what the session is allowed to do
- Shipped in Claude Code v2.1.248
Best for
Handing Claude Code to someone whose work never needs it to execute anything.
When to use it
You want a session that cannot run code, fetch a URL, or pull settings off the machine.
Who benefits
Teams putting Claude Code in front of people outside engineering, and anyone running it on work they do not fully trust.
Join the newsletter to get ahead with AI.
I share strategies, new modules, free guides, and tools to get you better at using AI in your work.
Leading a team? See team programs →
