Codex.app injecting restricted network access
Resolved 💬 4 comments Opened Feb 27, 2026 by samdeane Closed Jun 23, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.226.940 (720)
What subscription do you have?
Plus? The $20/month one!
What platform is your computer?
macOS 26.3 (25D125)
What issue are you seeing?
I’m seeing inconsistent sandbox/network behavior in Codex.app.
Although my local configuration has network enabled and I explicitly request elevated execution when needed, Codex sometimes runs with a later-injected permissions block that says network is restricted, which causes gh/API commands to fail unless escalated again.
My config.toml includes:
model = "gpt-5.3-codex"
personality = "pragmatic"
profile = "full_auto"
[profiles.full_auto]
approval_policy = "on-request"
sandbox_mode = "workspace-write"
[profiles.readonly_quiet]
approval_policy = "never"
sandbox_mode = "read-only"
# Optional: Allow network in workspace-write mode
[sandbox_workspace_write]
network_access = true
[projects."/Users/sam/Developer/Projects/"]
trust_level = "trusted"
The project should be being treated as trusted as its path is /Users/sam/Developer/Projects/ActionStatus.
What happened
- A command using
ghfailed with: error connecting to api.github.com- In the same session, the effective permissions instructions included:
- “Network access is restricted.”
- Retrying with escalated permissions succeeded.
Why this is a problem
- It makes behavior hard to predict from
config.toml. - It’s unclear which policy source is authoritative (local config vs app-injected runtime policy).
- It creates avoidable friction for normal GitHub workflows.
What steps can reproduce the bug?
- Configure Codex with network enabled locally (for example via
config.toml), then start a Codex.app session. - In the repo, run a GitHub API command in default sandbox mode, e.g.
gh pr list --head <branch> --base main --json number,title,url. - Observe failure:
error connecting to api.github.com(network unavailable in effective sandbox). - Check session-provided permissions context and note it includes
Network access is restricted. - Re-run the same
ghcommand withsandbox_permissions=require_escalated. - Observe success (command returns normal JSON output).
- Re-run subsequent
ghoperations (e.g.,gh pr create,gh pr view) with escalation and observe they also succeed.
What is the expected behavior?
- My configured sandbox/network settings (and explicit
sandbox_permissionsusage) should be applied consistently. - If runtime policy overrides local config, that should be clearly surfaced in the UI/session metadata.
Additional information
- Codex.app (desktop)
- Repo workflow using
ghCLI - Local config has network enabled, but effective session policy reported restricted network access
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
This may also be related to Codex.app not correctly parsing/using the rules I have defined in
~/.codex/rules.See the following transcript:
Similar to #12919 but I'm not certain it's an exact dupe, so I'm going to leave this one open.
Hi, I have the same issue as of today. Sorry, I can see 2 issues closed as duplicate. Is there another open issue for this?