What
sandbox.excludedCommands lists commands Claude Code may run outside the sandbox (the restricted environment that limits what commands can touch). When unsandboxed commands are forbidden, this list is now read only from trusted settings.
- The rule applies when managed settings or a
--settingsfile setallowUnsandboxedCommands: false, whenforbidUnsandboxedCommandsapplies, or when managed settings setnetwork.allowManagedDomainsOnly. - Entries are then read only from managed settings,
--settingsand user settings. Entries in project.claude/settings.jsonand.claude/settings.local.jsonare dropped, and a debug line once per session says how many were ignored. The setting's description now states this. - Adding an exclusion under that policy writes it to user settings instead of local settings.
- If user settings are turned off (for example with
--setting-sources), adding an exclusion is refused with the codeuser_settings_disabledand a "Can't exclude" error explaining there is no settings file where it would take effect. Before, it was saved where it had no effect and the command reported success.
This has no feature switch.
Why
Before, a repository could list commands in its own settings file and run them outside a sandbox the administrator had made mandatory. The add command also stops claiming success for an exclusion that does nothing. If your project relies on excludedCommands under such a policy, move those entries to user settings or ask your administrator.