Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.248 ·

New --restricted session mode

New --restricted flag starts a locked-down session with no shell tools and no settings files.

Use it now Notable New Features
JSON All of v2.1.248
Use it nowTier: how much it should matter to you
5Useful: my rating, 1 to 5
5Signal: worth watching, 1 to 5
PermissionsArea: what it touches
New FeaturesKind: in v2.1.248,
What probably matters to youSection of the release
What

A new command-line flag, also settable as the environment variable CLAUDE_CODE_RESTRICTED=1, starts a locked-down session that drops the built-in tools which run commands or code (Bash, PowerShell, REPL) plus WebFetch unless --tools names them, confines the file tools to the working directories, refuses bypassPermissions, and loads no user, project or local settings files. Neither the flag nor the variable existed in 2.1.247, and nothing gates it: pass it and it applies, leave it off and the session behaves as before.

Details
  • Registered as a normal CLI option and also read straight off the process arguments by the early argv scan during settings load, so it takes effect from the very start of launch on any invocation, not just commands that register it.
  • Managed settings and an explicit --settings file still apply; the rest of the setting-sources list is emptied.
  • Writes to settings, git and tool-configuration files require explicit approval.
  • Attachments outside the working directory are rejected, and cloud sessions are blocked outright.
  • The restriction latches onto the launch options and is re-emitted when Claude Code rebuilds its own argv, respawns itself or launches helper sessions, so relaunches and child sessions stay restricted.
  • Denials name the mode: --restricted: path outside the working directory from the file tools, and bypassPermissions not supported in restricted mode.
  • The dispatch command carries the one registered option description, "Start dispatched sessions in restricted mode".
  • Startup telemetry records a restricted field, the cloud-session capability table lists restricted as a tool restriction, and the SDK counts restricted among the options that mark a launch as non-default.
Usage
claude --restricted
CLAUDE_CODE_RESTRICTED=1 claude
Evidence

restricted: le,, --restricted: path outside the working directory, bypassPermissions not supported in restricted mode, CLAUDE_CODE_RESTRICTED, ...(n.restricted ? ["--restricted"] : []),, Start dispatched sessions in restricted mode, strictMcpConfig: !1,, Restricted mode: removes the built-in tools that run commands or code

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

Read from
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Confirmed since Anthropic's documentation has since written up --restricted, on Tools reference. * A permissions [deny rule](/docs/en/permissions#match-all-uses-of-a-tool), the `--disallowedTools` flag, or [`--restricted`](/docs/en/cli-reference#cli-flags) removes `Bash` from the session. tools-reference see the edit
Confirmed since Anthropic's documentation has since written up --tools, on Tools reference. * You name `Glob` or `Grep` in [`--tools` or `--allowedTools`](/docs/en/cli-reference#cli-flags) when you start the session, or in the equivalent [Agent SDK](/docs/en/agent-sdk/overview) options. With `--tools` you get the ones you list, a… tools-reference see the edit
Added since A small documentation edit on CLI reference touched a line naming --tools after this was published. | `--tools` | Restrict which built-in tools Claude can use. Use `""` to disable all, `"default"` for the default set, or tool names like `"Bash,Edit,Read"`. On macOS, Linux, and WSL, the default set leaves out `Glob` and `Grep`, as describ… cli-reference see the edit
How sure we are
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agreesA small documentation edit on CLI reference touched a line naming --tools after this was published.
Anthropic's release notes agreeAdded --restricted (or CLAUDE_CODE_RESTRICTED=1): removes the built-in tools that run commands or code and WebFetch (unless named in…
The name it cites is new in this buildNew in this build: --restricted

See this entry in the whole of v2.1.248 →

Feedback