Skip to content
BENIBIX Learn

sandbox.network.allowedDomains

AI⌨️ Claude CodeConfiguration

Also known as allowedDomains

A list of web hosts that commands in the sandbox may reach with no prompt.

Think of it like

It is like a list of friends' homes a child may walk to on their own.

Example

Emma's npm installs kept asking to reach the registry. She adds *.npmjs.org, and installs run without a prompt.

Why it matters

The hosts a project needs every day should not need a yes every time.

Definition

sandbox.network.allowedDomains is a settings key. It lists the hosts that commands in the sandbox may reach with no prompt. A wildcard such as *.npmjs.org matches each subdomain. Adding :443 limits an entry to one port. Left unset, your permission mode decides what to do the first time a command reaches a new host.

Example code

json
{
  "sandbox": {
    "network": {
      "allowedDomains": ["github.com", "*.npmjs.org"]
    }
  }
}
Let commands reach GitHub and npm without a prompt.
Deny first, then allow, then your permission mode.

Common mistake

Writing npmjs.org and expecting registry.npmjs.org to match. A subdomain needs the *. wildcard.

Key takeaways

  1. 1
    Reach without asking. Listed hosts.
  2. 2
    Wildcards for subdomains. *.example.com.
  3. 3
    Port optional. :443.

Compare