Skip to content

Add allowMachLookup config for XPC services (macOS)#92

Open
dvic wants to merge 1 commit intoanthropic-experimental:mainfrom
qdentity:dvic/allow-mach-lookup
Open

Add allowMachLookup config for XPC services (macOS)#92
dvic wants to merge 1 commit intoanthropic-experimental:mainfrom
qdentity:dvic/allow-mach-lookup

Conversation

@dvic
Copy link

@dvic dvic commented Jan 14, 2026

Summary

  • Adds allowMachLookup network config option for specifying additional XPC/Mach service names to permit in the sandbox
  • Supports exact matches (com.1password.helper) and prefix wildcards (2BUA8C4S2C.com.1password.*)
  • Enables tools like 1Password CLI to work within the sandbox

Test plan

  • Build passes
  • Verified 1Password CLI works with allowMachLookup: ['2BUA8C4S2C.com.1password.*']
  • Verified 1Password CLI fails without allowMachLookup (can't connect to desktop app)

Closes #83

Adds a new network config option allowMachLookup that allows specifying additional XPC/Mach service names to permit in the sandbox. This enables tools like 1Password CLI that require access to services not in the default allowlist.

Supports both exact matches and prefix wildcards:
- Exact: "com.1password.helper"
- Prefix: "2BUA8C4S2C.com.1password.*"

Closes anthropic-experimental#83
@madeleineostoja
Copy link

Any progress on getting this merged? Also required for running Playwright E2E tests in the sandbox, since it uses Chromium mach lookup

@steven-range
Copy link

👍 Currently having to exclude gh from sandbox so it'll work.

@nneubauer
Copy link

I just wanted to +1 this because I assume this will fix an issue that currently, for iOS development, you can't run the simulator (eg. for agentic testing) in the sandbox environment as it requires at least the following XPC services via mach-lookup. I don't feel competent enough to judge, but it seems to me this PR would provide an appropriate fix.

  - com.apple.CoreSimulator.CoreSimulatorService — the main simulator daemon
  - com.apple.CoreSimulator.SimDevice.* — individual simulator devices                                                                        
  - com.apple.CoreSimulator.SimLaunchHost-arm64 — process launching                                                                         
  - com.apple.CoreSimulator.SimulatorTrampoline — simulator bootstrapping                                                                     

sysid added a commit to sysid/sandbox-runtime-improved that referenced this pull request Mar 25, 2026
Allow users to specify additional XPC/Mach service names in the sandbox
profile via a new `allowMachLookup` string array config option. Services
ending with `*` use global-name-prefix (wildcard matching); others use
global-name (exact match).

Use case: tools like 1Password CLI that require specific Mach services
not in the default allowlist.

Source: anthropic-experimental#92
sysid added a commit to sysid/sandbox-runtime-improved that referenced this pull request Mar 26, 2026
Allow users to specify additional XPC/Mach service names in the sandbox
profile via a new `allowMachLookup` string array config option. Services
ending with `*` use global-name-prefix (wildcard matching); others use
global-name (exact match).

Use case: tools like 1Password CLI that require specific Mach services
not in the default allowlist.

Source: anthropic-experimental#92
sysid added a commit to sysid/sandbox-runtime-improved that referenced this pull request Mar 26, 2026
Allow users to specify additional XPC/Mach service names in the sandbox
profile via a new `allowMachLookup` string array config option. Services
ending with `*` use global-name-prefix (wildcard matching); others use
global-name (exact match).

Use case: tools like 1Password CLI that require specific Mach services
not in the default allowlist.

Source: anthropic-experimental#92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Add allowMachLookup config for XPC services (1Password CLI, etc.)

4 participants