claude-code - 💡(How to fix) Fix [DOCS] Sandbox settings missing `sandbox.network.allowMachLookup` documentation for macOS [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45476Fetched 2026-04-09 08:04:33
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Code Example

> type SandboxNetworkConfig = {
>   allowedDomains?: string[];
>   allowManagedDomainsOnly?: boolean;
>   allowLocalBinding?: boolean;
>   allowUnixSockets?: string[];
>   allowAllUnixSockets?: boolean;
>   httpProxyPort?: number;
>   socksProxyPort?: number;
> };
>
RAW_BUFFERClick to expand / collapse

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/settings

Section/Topic

sandbox.network configuration keys for macOS sandboxing

Current Documentation

The settings reference currently enumerates these sandbox network keys, but does not mention sandbox.network.allowMachLookup:

| network.allowUnixSockets | Unix socket paths accessible in sandbox (for SSH agents, etc.) | network.allowAllUnixSockets | Allow all Unix socket connections in sandbox. Default: false | network.allowLocalBinding | Allow binding to localhost ports (macOS only). Default: false | network.allowedDomains | Array of domains to allow for outbound network traffic. Supports wildcards (e.g., *.example.com). | network.allowManagedDomainsOnly | (Managed settings only) Only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. | network.httpProxyPort | HTTP proxy port used if you wish to bring your own proxy. | network.socksProxyPort | SOCKS5 proxy port used if you wish to bring your own proxy.

The Agent SDK TypeScript reference also lists the network config shape without this property:

type SandboxNetworkConfig = {
  allowedDomains?: string[];
  allowManagedDomainsOnly?: boolean;
  allowLocalBinding?: boolean;
  allowUnixSockets?: string[];
  allowAllUnixSockets?: boolean;
  httpProxyPort?: number;
  socksProxyPort?: number;
};

Changelog v2.1.97 adds a user-facing sandbox behavior entry:

Improved sandbox: sandbox.network.allowMachLookup now takes effect on macOS

What's Wrong or Missing?

Changelog v2.1.97 confirms that sandbox.network.allowMachLookup is a real sandbox setting with macOS-specific behavior, but the Claude Code docs do not currently document this key anywhere in the settings or Agent SDK sandbox configuration references.

That leaves users without the information they need to use the setting correctly:

  • what value shape it accepts
  • what macOS Mach services it is intended to allow
  • whether it applies only to sandboxed Bash subprocesses
  • what security tradeoffs or cautions apply

Suggested Improvement

Add sandbox.network.allowMachLookup to the sandbox network configuration documentation in the settings reference and Agent SDK references.

Suggested content outline:

  1. Add the new key to the sandbox.network table in settings
  2. Document its type, default, and macOS-only scope
  3. Explain what kind of Mach lookup access it grants inside the sandbox
  4. Add a short example showing where it belongs in the sandbox.network object
  5. Add a security note similar to the existing allowUnixSockets / weaker-isolation warnings if this setting can broaden sandbox escape or data-exfiltration surface

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

PageContext
https://code.claude.com/docs/en/settingsPrimary sandbox settings reference; sandbox.network key table omits allowMachLookup
https://code.claude.com/docs/en/sandboxingSandboxing overview and security guidance; should mention macOS Mach lookup configuration if supported
https://code.claude.com/docs/en/agent-sdk/typescriptSandboxNetworkConfig TypeScript reference omits allowMachLookup
https://code.claude.com/docs/en/agent-sdk/pythonSandboxNetworkConfig Python reference omits allowMachLookup
https://platform.claude.com/docs/en/agent-sdk/typescriptAgent SDK cross-reference also omits allowMachLookup
https://platform.claude.com/docs/en/agent-sdk/pythonAgent SDK cross-reference also omits allowMachLookup

Total scope: 6 pages affected

Source: Changelog v2.1.97

Exact changelog entry: Improved sandbox: sandbox.network.allowMachLookup now takes effect on macOS

extent analysis

TL;DR

Add sandbox.network.allowMachLookup to the sandbox network configuration documentation in the settings reference and Agent SDK references.

Guidance

  • Review the changelog entry for v2.1.97 to understand the intended behavior of sandbox.network.allowMachLookup.
  • Update the sandbox.network table in the settings reference to include allowMachLookup, documenting its type, default, and macOS-only scope.
  • Add an explanation of the Mach lookup access granted by this setting and provide a short example of its usage in the sandbox.network object.
  • Consider adding a security note to highlight potential risks associated with this setting, similar to existing warnings for allowUnixSockets.

Example

type SandboxNetworkConfig = {
  // ...
  allowMachLookup?: boolean; // Add this line to the SandboxNetworkConfig type
};

Notes

The exact behavior and security implications of sandbox.network.allowMachLookup are not fully specified in the issue, so documentation updates should be careful to accurately reflect the intended use and potential risks of this setting.

Recommendation

Apply workaround: Update the documentation to include sandbox.network.allowMachLookup as suggested, to provide users with necessary information to use the setting correctly.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING