macOS: intermittent loopback connect EPERM under an explicit localhost-only sandbox
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
Summary
Synthetic local tests launched through the Codex desktop app intermittently fail with connect EPERM despite explicit localhost allowances.
The tests also use a custom sandbox-exec profile. We have not established whether that profile, another effective policy, or their interaction causes the denial.
Observed behavior
On September 11, 2026:
- Application failure:
17:02:02.477 UTC - Error:
connect EPERM, errno-1 - Endpoint:
127.0.0.1:50838 - Process PID:
89715 - A kernel
network-outbounddenial matched the PID and target port at17:02:02.574523 UTC, approximately 98 milliseconds later.
The kernel event did not identify the denying profile/rule or contain a literal loopback address.
The Miniflare/D1 runtime started successfully and completed synthetic setup. Of 1,590 logical operations started, 1,589 succeeded and one failed. Scheduling stopped at the first failure, with no retries. Cleanup completed.
An earlier native HTTP test showed the same error class with another closely correlated kernel denial, so the observation is not limited to Miniflare.
Environment
- macOS; Codex desktop app
- Node: 24.15.0
- Miniflare: 5.20260910.0-alpha
- workerd: 1.20260910.1
- Undici: 7.29.0
The profile includes these network clauses:
(version 1)
(allow default)
(deny network*)
(allow network-outbound (remote ip "localhost:*"))
(allow network-inbound (local ip "localhost:*"))
(allow network* (local unix-socket))
Additional file restrictions protect credential/configuration files, canonical source, and historical evidence. The test environment contains no inherited credentials.
Requested guidance
How can we identify the exact effective profile/rule responsible and determine the supported minimum correction while preserving non-loopback network restrictions and protected-file restrictions?
We are not requesting sandbox removal or unrestricted execution. A redacted diagnostic packet is available. No credentials, customer data, raw logs, or full conversation contents are included in this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file or test is named. Start with the available redacted diagnostic packet and correlate the kernel network-outbound denial with the effective sandbox profile and listed timestamps; done means identifying the denying rule and the supported minimum correction while preserving non-loopback and protected-file restrictions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100