Claude Code can deny sandboxed commands instead of prompting for network access
Claude Code's sandbox normally prompts you when a sandboxed bash command tries to reach a host that isn't on its network allowlist. Claude Code 2.1.219 (July 24, 2026) adds a setting to skip the prompt and deny instead.
{
"sandbox": {
"network": {
"allowedDomains": ["github.com", "*.npmjs.org"],
"strictAllowlist": true
}
}
}
With sandbox.network.strictAllowlist set to true, a sandboxed command reaching for any host outside the allowlist is denied outright — no approval dialog. The allowlist it checks against is network.allowedDomains plus any domains granted through WebFetch(domain:...) allow rules, or only the managed-settings entries when network.allowManagedDomainsOnly is also set.
Two scope limits matter here:
- It only gates sandboxed commands. In-process tools like
WebFetcharen't affected by this setting. - It's only honored from user settings, managed settings, or a CLI
--settingsvalue — not from.claude/settings.jsonor.claude/settings.local.json. A project can't flip this on for itself; it has to come from outside the repo.
Default is false, and the setting requires Claude Code v2.1.219 or later.
What this means
This is aimed at unattended or CI-style runs where a sandbox network prompt has nobody to answer it — previously that either blocked or (depending on your approval settings) silently allowed. strictAllowlist gives those runs a hard deny instead. See the Claude Code sheet for the current sandbox and permission settings.