Codex desktop app ignores custom default_permissions profile for read-only filesystem with network access
Summary
The Codex desktop app does not apply a custom permissions profile configured through default_permissions. New desktop threads continue to use readOnly + networkAccess:false, even after fully restarting the app.
The same permissions profile works correctly when explicitly selected through the Codex CLI with codex sandbox -P net-readonly.
Environment
- Codex desktop app / bundled CLI:
codex-cli 0.140.0-alpha.2 - OS: macOS 14.6, arm64
- Approval policy:
on-request - Project trust level:
trusted
Configuration
approval_policy = "on-request"
approvals_reviewer = "user"
default_permissions = "net-readonly"
[permissions.net-readonly]
description = "Allow network, but require approval for writes"
extends = ":read-only"
[permissions.net-readonly.network]
enabled = true
mode = "limited"
[permissions.net-readonly.network.domains]
"*" = "allow"
Steps to reproduce
- Add the configuration above to
~/.codex/config.toml. - Fully restart the Codex desktop app.
- Create a new desktop thread in a trusted project.
- Run a network request such as
curl -I https://example.com. - Attempt to write a file.
Actual behavior
- Desktop thread permission snapshot is created as:
sandboxPolicy: readOnly
networkAccess: false
- Network requests fail because DNS/network access is denied.
- File writes correctly require approval.
- Restarting the app and creating new threads does not apply the configured profile.
Expected behavior
The desktop app should apply default_permissions = "net-readonly" to new threads, resulting in:
- Read-only filesystem, with writes requiring approval.
- Network access controlled by the profile's domain allowlist.
CLI verification
The profile itself is valid and works when explicitly selected:
codex sandbox -P net-readonly curl -I https://example.com
This successfully returns HTTP 200, confirming the issue appears specific to how the desktop app resolves or passes the default permissions profile.
Additional diagnostic information
codex doctor --json reports the desktop thread sandbox as restricted with the network sandbox enabled. The desktop app global state records newly created affected threads as readOnly + networkAccess:false.
5 Comments
@lns480672-eng When I added a second profile suddenly the profiles appeared in the Codex desktop app and I could select the correct permission profile. Maybe this helps you also?
Adding another data point from macOS/Codex Desktop.
Environment:
codex-cli 0.142.3Observed behavior:
Custom, and config using the new profile key:new sessions still behaved as if they were effectively read-only. Workspace writes,
$TMPDIR, and/tmpwrites failed withOperation not permitted; zsh heredoc failed withcan't create temp file for here document; andgit statusfailed while trying to create/tmp/xcrun_db-*.Full accessmade those write/heredoc/git operations work.Customreproduced the read-only behavior.then fully restarting Codex App made
Customwork correctly in both a new session and the previously affected session.This looks consistent with Desktop
Customnot applying thedefault_permissionsprofile path in this case, while the legacysandbox_modepath still works.macOS desktop app cannot reach my local infrastructure despite full access
I’m using Codex from the ChatGPT desktop app on macOS to work across several local projects. Those projects need to talk to services on my home/LAN environment, including Forgejo, Proxmox, and a Forgejo Runner.
Everything works normally when I run the same commands from the native macOS Terminal. The issue only appears when the command is launched from Codex.
I initially suspected DNS, Tailscale, or a local firewall issue, but the evidence points instead to the Codex execution environment blocking private LAN traffic.
Codex can access the public Internet and Tailscale successfully, but it cannot reach any RFC1918 LAN address.
For example, my Forgejo SSH endpoint is available at:
192.168.1.94:2222
From a native macOS Terminal, it works. From Codex, it fails immediately:
nc: connectx to 192.168.1.94 port 2222 (tcp) failed: No route to host
ssh: connect to host 192.168.1.94 port 2222: No route to host
ping: sendto: No route to host
This is not limited to Forgejo. The same happens when contacting the local gateway:
192.168.1.1: No route to host
So the problem affects the entire local network, not one particular service.
Why this does not look like a network configuration problem
The host itself has a valid route to the target:
route to: 192.168.1.94
interface: en0
ARP resolution is also available for the device on the LAN.
At the same time:
codexis enabled;This suggests that the Codex command runner is being restricted separately from the host network stack.
Environment
macOS: 27.0, arm64
ChatGPT/Codex desktop app: 26.727.51351
Bundled Codex CLI: 0.146.0-alpha.9.2
Bundle identifier: com.openai.codex
Execution host identity: codex-code-mode-host
My relevant Codex configuration is:
approval_policy = "never"
sandbox_mode = "danger-full-access"
Despite that,
codex doctor --jsonreports:filesystem sandbox: unrestricted
network sandbox: enabled
That is the key detail: the filesystem is unrestricted, but the network sandbox remains enabled.
Reproduction
nc -vz -w 5 192.168.1.94 2222
ssh -o BatchMode=yes -o ConnectTimeout=5 forgejo-local exit
ping -c 1 -W 1000 192.168.1.94
Expected behavior
With:
sandbox_mode = "danger-full-access"
I would expect Codex-launched commands to have the same LAN reachability as commands launched from Terminal, including access to private addresses such as
192.168.1.x.This is especially important for local development workflows involving self-hosted Git, virtualization, CI runners, NAS devices, internal APIs, and home-lab infrastructure.
Additional observation
Docker commands also time out from Codex when they try to reach Docker Desktop’s Unix socket:
curl --unix-socket ~/.docker/run/docker.sock --max-time 5 http://localhost/_ping
I cannot yet tell whether Docker Desktop itself is unhealthy or whether the same Codex sandbox/proxy policy is preventing access to the Unix socket. Given the LAN behavior, I suspect the latter may be involved.
I can reproduce what appears to be the same underlying Codex Desktop network-permission problem on macOS, but in my case it also occurs when Network / Full Access is explicitly enabled in the Desktop UI.
Environment
26.803.4151526.2Reproduction inside Codex Desktop
In a Codex Desktop local session:
Result:
The important signal is:
even though Network / Full Access is enabled in the Codex Desktop UI.
Control test outside Codex
On the same Mac, same user, in the normal macOS Terminal:
GitHub CLI authentication works:
Network connectivity works:
GitHub Git access also works:
So on the host:
ghauthentication worksgit ls-remoteworksGH_TOKEN,GITHUB_TOKEN,GH_HOSTor proxy environment overrides are presentwhile commands executed inside Codex Desktop have networking disabled.
Fresh-session reproduction outside the project
I then created a second fresh Codex Desktop local session outside the original repository/project and repeated the diagnostic.
It produced the same result:
This substantially rules out repository-specific configuration as the cause.
The failure follows the Codex Desktop execution environment/session instead.
Expected behavior
When Network / Full Access is enabled in the Codex Desktop UI, newly-created local sessions should not receive:
and commands executed by Codex should be able to perform permitted DNS/network operations.
Impact
This is particularly problematic for agentic GitHub workflows.
In my case it caused a release workflow to fail closed because Codex could not:
gh;The host itself had completely normal GitHub connectivity throughout.
It can also lead to a misleading diagnosis:
gh auth statusreports the token as invalid inside Codex, while the same keyring-backed credentials authenticate successfully immediately outside Codex.For that reason I would consider the
ghauthentication message a secondary/unconfirmed symptom until it can be reproduced inside a Codex sandbox with working network access.Summary
The reproducible discrepancy is:
Reproduced on Aug 11, 2026.
This appears to be a Codex Desktop permission/sandbox propagation issue rather than a GitHub, macOS network, or repository configuration problem.
Additional configuration evidence:
Codex Desktop is currently configured in the UI with:
The relevant persisted
config.tomlsettings are also:There is no
CODEX_SANDBOX_NETWORK_DISABLEDassignment in myconfig.toml.The configuration also does not set
GH_TOKEN,GITHUB_TOKEN,HTTP_PROXY,HTTPS_PROXY, orALL_PROXY.Despite both the Desktop UI and the persisted configuration explicitly allowing full access, fresh Codex Desktop sessions still start with:
and DNS resolution from the Codex command environment fails.
This was reproduced in multiple fresh local sessions, including a session opened outside the original repository/project.
So the observed state is:
This strongly suggests that the effective runtime sandbox/network policy is not matching either the persisted user configuration or the Desktop UI configuration.
For completeness, the host macOS Terminal continues to have normal DNS/HTTPS connectivity and valid GitHub CLI authentication while the Codex Desktop sandbox is affected.