excludedCommands does not bypass macOS sandbox for Metal/GPU (IOKit) access
Description
Commands listed in sandbox.excludedCommands do not get full sandbox bypass on macOS — Metal/GPU (IOKit) access is still blocked by the sandbox-exec Seatbelt profile.
## Environment
- macOS Darwin 25.3.0, Apple Silicon
- Claude Code 2.1.81
sandbox.enabled: truesandbox.excludedCommands: ["git", "gh", "docker", "qmd"]
## Steps to Reproduce
- Add
qmdtosandbox.excludedCommands - Run
qmd update && qmd embedvia Bash tool qmd updatesucceeds (filesystem access works with~/.cache/qmdinsandbox.filesystem.allowWrite)qmd embedfails — Metal can't initialize- Similarly,
ghinexcludedCommandsstill gets TLS blocked
## Error (qmd embed)
`` ``
[node-llama-cpp] ggml_metal_init: error: failed to create command queue
[node-llama-cpp] ggml_backend_metal_device_init: error: failed to allocate context
## Error (gh)
`` ``
Post "https://api.github.com/graphql": tls: failed to verify certificate: x509: OSStatus -26276
## Root Cause
excludedCommands should skip sandbox-exec entirely, but commands are still running inside the sandbox. This is consistent with #17821, #22620, and #29274.
## Expected Behavior
Commands in excludedCommands run completely outside sandbox-exec.
## Workaround
! command (user-executed, outside sandbox) works.
## Related Issues
- #13108 — GPU device passthrough
- #17821 — excludedCommands does not bypass sandbox
- #22620 — excludedCommands bypass failure
- #29274 — excludedCommands network bypass failure
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗