Codex Desktop blocks one LAN destination while allowing another on macOS
What version of the Codex App are you using (From “About Codex” dialog)?
26.727.51351 (build 6119), bundled codex-cli 0.146.0-alpha.9.2
What subscription do you have?
Plus
What platform is your computer?
Darwin 25.6.0 arm64 arm
What issue are you seeing?
Codex Desktop blocks traffic to one LAN host while allowing another host on the same subnet through the same interface.
Commands executed by Codex Desktop produce:
$ nc -vz -w 3 192.168.1.11 22
nc: connectx to 192.168.1.11 port 22 (tcp) failed: No route to host
$ curl -kS --connect-timeout 3 --max-time 5 \
-o /dev/null -w 'HTTP %{http_code}\n' \
https://192.168.1.11:8006/api2/json/version
curl: (7) Failed to connect to 192.168.1.11 port 8006 after 1 ms: Couldn't connect to server
HTTP 000
$ nc -vz -w 3 192.168.1.20 22
Connection to 192.168.1.20 port 22 [tcp/ssh] succeeded!
Both destinations are reachable from Terminal. Both are also reachable when either Codex runtime is explicitly executed under a Codex Seatbelt sandbox from Terminal.
The problem occurs in new Codex Desktop tasks and across different repositories.
What steps can reproduce the bug?
- Use two reachable hosts on the same private subnet. Here they are
192.168.1.11and192.168.1.20.
- Confirm both from Terminal:
nc -vz -w 3 192.168.1.11 22
nc -vz -w 3 192.168.1.20 22
Both connections succeed.
- Run both Codex runtimes explicitly under Codex Seatbelt from Terminal:
for bin in \
/opt/homebrew/bin/codex \
/Applications/ChatGPT.app/Contents/Resources/codex
do
echo "=== $bin ==="
"$bin" --version
"$bin" sandbox -C "$PWD" -P lab --log-denials -- \
/bin/zsh -c '
env | grep "^CODEX_SANDBOX="
nc -vz -w 3 192.168.1.11 22
nc -vz -w 3 192.168.1.20 22
curl -kS --connect-timeout 3 -o /dev/null \
-w "HTTPS status: %{http_code}\n" \
https://192.168.1.11:8006/api2/json/version
'
done
Both runtimes report:
CODEX_SANDBOX=seatbelt
Connection to 192.168.1.11 port 22 succeeded
Connection to 192.168.1.20 port 22 succeeded
HTTPS status: 401
The HTTP 401 is expected without credentials and confirms connectivity.
- Ask Codex Desktop to run equivalent probes:
ping -c 2 -W 1000 192.168.1.11
nc -vz -w 3 192.168.1.11 22
curl -kS --connect-timeout 3 --max-time 5 \
-o /dev/null -w 'HTTPS status: %{http_code}\n' \
https://192.168.1.11:8006/api2/json/version
ping -c 2 -W 1000 192.168.1.20
nc -vz -w 3 192.168.1.20 22
Desktop results:
192.168.1.11: No route to host / HTTPS status 000
192.168.1.20: ICMP and TCP/22 succeed
- Start a packet capture from Terminal:
sudo tcpdump -ni en7 \
'(host 192.168.1.11 or host 192.168.1.20) and (icmp or tcp port 22 or tcp port 8006)'
- Repeat the probes from Codex Desktop.
The capture contains ICMP traffic and a completed TCP handshake for 192.168.1.20, but no packets for 192.168.1.11. The failing request is rejected locally before reaching the network interface.
Session ID: 019f6017-1596-7370-bfac-e259a1514700
What is the expected behavior?
Codex Desktop should permit both destinations when the effective task permissions report network access as enabled.
Its behavior should match an explicit codex sandbox invocation using the same permission profile.
If an additional Desktop-specific policy blocks a destination, Codex should expose the effective policy and denial reason instead of returning an unexplained No route to host.
Additional information
Diagnostics performed:
- The Desktop command environment reports
CODEX_SANDBOX=seatbeltandCODEX_PERMISSION_PROFILE=lab. - Persisted task metadata reports
"network":"enabled". - Explicitly binding the failing commands to Ethernet and its source address does not change the result.
- The same interface and source address successfully reach
192.168.1.20. - No relevant Seatbelt network denial appears in macOS logs.
- The app's
Info.plistdoes not containNSLocalNetworkUsageDescription. - A third-party transparent-proxy extension was disabled and Codex restarted; behavior was unchanged.
- Homebrew CLI
0.146.0and bundled runtime0.146.0-alpha.9.2reach both destinations when launched undercodex sandboxfrom Terminal. - Tcpdump confirms Codex Desktop emits no packets for the blocked destination.
This appears specific to an additional Codex Desktop execution layer rather than the repository permission profile or standard Codex Seatbelt sandbox.
This may be related to #35346, but this case is destination-specific rather than blocking all LAN access.
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
feedback-id: 019f6017-1596-7370-bfac-e259a1514700
Follow-up: macOS Local Network permission
I found that enabling ChatGPT under:
System Settings → Privacy & Security → Local Network
immediately restored access from Codex Desktop to
192.168.1.11.After enabling the toggle:
This identifies macOS Local Network Privacy, attributed to the parent ChatGPT application, as the immediate blocking layer.
One unexplained detail remains: while ChatGPT's Local Network permission was disabled, Codex Desktop could already reach
192.168.1.20and192.168.1.22, which are on the same Ethernet subnet. There are no configuredAllowedEthernetLocalNetworkAddressesorAllowedWiFiLocalNetworkAddressesexceptions.The actionable Codex/ChatGPT issue is therefore:
No route to host, without identifying the macOS privacy restriction or suggesting that the ChatGPT Local Network toggle be enabled.Thanks for the detailed follow-up and destination examples. This reads like macOS Local Network Privacy behavior affecting the ChatGPT host process rather than Codex path logic: destination-specific failures with
No route to hostand permission-related visibility are consistent with per-app Local Network filtering on macOS. Suggest filing this as a desktop+permissions diagnostic item with a specific action path in app: if local connectivity is denied for a host, surfaceNo local network permissionguidance that points toSystem Settings → Privacy & Security → Local Networkfor the parent ChatGPT app.Thanks. This now points to macOS Local Network Privacy rather than destination-specific filtering in Codex itself. The inconsistent behavior across destinations remains unexplained, but may be caused by macOS state or caching.
I opened #36962 to track the remaining actionable Codex Desktop problem: requesting the required Local Network permission and providing a useful diagnostic when that permission is missing.
Closing this issue because the cause of the originally reported connectivity failure has been identified.