claude-code - 💡(How to fix) Fix feat: support per-command enableWeakerNetworkIsolation as safer alternative to dangerouslyDisableSandbox

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…

enableWeakerNetworkIsolation is a sandbox setting that opens the Mach IPC channel to com.apple.trustd.agent, allowing Go binaries (gh, terraform, kubectl, etc.) to perform TLS certificate verification via macOS Security.framework. It's currently a session-level setting in settings.json that applies to all commands.

It would be useful if this could be toggled per-command, similar to how dangerouslyDisableSandbox works as a parameter on the Bash tool.

Root Cause

enableWeakerNetworkIsolation is a sandbox setting that opens the Mach IPC channel to com.apple.trustd.agent, allowing Go binaries (gh, terraform, kubectl, etc.) to perform TLS certificate verification via macOS Security.framework. It's currently a session-level setting in settings.json that applies to all commands.

It would be useful if this could be toggled per-command, similar to how dangerouslyDisableSandbox works as a parameter on the Bash tool.

Fix Action

Fix / Workaround

Current workaround

RAW_BUFFERClick to expand / collapse

Summary

enableWeakerNetworkIsolation is a sandbox setting that opens the Mach IPC channel to com.apple.trustd.agent, allowing Go binaries (gh, terraform, kubectl, etc.) to perform TLS certificate verification via macOS Security.framework. It's currently a session-level setting in settings.json that applies to all commands.

It would be useful if this could be toggled per-command, similar to how dangerouslyDisableSandbox works as a parameter on the Bash tool.

Motivation

When a Go CLI tool fails with x509: OSStatus -26276 in the sandbox, the current options are:

  1. enableWeakerNetworkIsolation: true in settings.json — opens the trustd IPC channel for ALL commands in the session. Very narrow permission (just one IPC channel), but always-on.
  2. dangerouslyDisableSandbox: true per command — drops ALL sandbox protections (filesystem + network) for that one command.

Option 2 is dramatically less secure than option 1, but it's the only one with per-command granularity. A per-command enableWeakerNetworkIsolation would give users the best of both worlds: narrow permission scope AND per-command control.

Constraints

macOS Seatbelt profiles are applied at process launch and can't be loosened at runtime, so this may require an architectural approach (e.g., pre-apply the weaker profile but gate the IPC channel behind a runtime permission check, or spawn a helper process with the weaker profile only when requested).

Current workaround

Set enableWeakerNetworkIsolation: true in .claude/settings.local.json as documented at https://docs.codezero.io/guides/claude-code#go-based-tools-gh-terraform-kubectl-gcloud

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