codex cli interactive mode doesn't honor config for domain filtering
What version of Codex CLI is running?
codex-cli 0.123.0
What subscription do you have?
enterprise GPT and API KEY - repro was via API KEY
Which model were you using?
gpt-5.4
What platform is your computer?
Ubuntu 24.04 Linux 6.14.0-37-generic x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
iTerm2 -> ssh-> tmux codex is running inside the remote linux tmux session
What issue are you seeing?
granular workspace permissions are not being honored in the codex tui, so I can't let it run automatically against an allowlist of domains but block everything else
example repro below. I've also prepared a local fix if you are interested in a PR
What steps can reproduce the bug?
With the config snippet below codex 0.123 blocks a curl of example.com despite it being in the allowlist. e.g.
~/.codex/config.toml
model = "gpt-5.4"
model_reasoning_effort = "medium"
approvals_reviewer = "user"
default_permissions = "workspace"
[shell]
program = "/bin/bash"
args = ["--noprofile", "--norc"]
[permissions.workspace.filesystem]
":root" = "read"
":tmpdir" = "write"
[permissions.workspace.filesystem.":project_roots"]
"." = "write"
[permissions.workspace.network]
enabled = true
# full is still filtered by domain but allows POST etc (c.f. limited)
mode = "full"
# needed to resolve local 10.* IPs
allow_local_binding = true
[permissions.workspace.network.domains]
"example.com" = "allow"
[projects."/spare/local/ahornby/local/codex"]
trust_level = "trusted"
codex $ ~/bin/codex-x86_64-unknown-linux-musl.0.123
╭──────────────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.123.0) │
│ │
│ model: gpt-5.4 medium /model to change │
│ directory: /spare/local/ahornby/local/codex/codex-rs │
╰──────────────────────────────────────────────────────╯
Tip: New Build faster with Codex.
› run curl -q --connect-timeout 5 --max-time 10 https://example.com
• Running the exact curl command in the repo environment first. If sandboxed network blocks it, I’ll retry with an escalation request.
• Ran curl -q --connect-timeout 5 --max-time 10 https://example.com
└ % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: example.com
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
• The sandbox blocked DNS resolution. Retrying the same command outside the sandbox so you get the real result.
What is the expected behavior?
expected behaviour is that with the given config example.com is allowed but other domains like google.com are blocked. Here is an example of expected behaviour from my local fix where example.com is resolved but google.com blocked:
$ ./target/debug/codex
╭──────────────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.0.0) │
│ │
│ model: gpt-5.4 medium /model to change │
│ directory: /spare/local/ahornby/local/codex/codex-rs │
╰──────────────────────────────────────────────────────╯
Tip: Update Required - This version will no longer be supported starting May 8th. Please upgrade to the latest version (https://github.com/openai/codex/releases/latest) using your
preferred package manager.
› run curl -q --connect-timeout 5 --max-time 10 https://example.com
• Running the exact curl command in the repo shell so I can report the result directly.
• Ran curl -q --connect-timeout 5 --max-time 10 https://example.com
100 528 0 528 0 0 2934 0 --:--:-- --:--:-- --:--:-- 2949
<!doctype html><html lang="en"><head><title>Example Domain</title><meta name="viewport" content="width=device-width,
initial-scale=1"><style>body{background:#eee;width:60vw;margin:15vh auto;font-family:system-ui,sans-serif}h1{font-size:1.5em}div{opacity:0.8}a:link,a:visited{color:#348}</
style></head><body><div><h1>Example Domain</h1><p>This domain is for use in documentation examples without needing permission. Avoid use in operations.</p><p><a href="https://
iana.org/domains/example">Learn more</a></p></div></body></html>
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
• The command succeeded with exit code 0.
It returned the example.com HTML page, beginning with:
<!doctype html><html lang="en"><head><title>Example Domain</title>...
It downloaded 528 bytes within the timeout.
› run curl -q --connect-timeout 5 --max-time 10 https://google.com
• Running the exact curl command against google.com and I’ll report the response.
• Ran curl -q --connect-timeout 5 --max-time 10 https://google.com
└ % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (56) CONNECT tunnel failed, response 403
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
• The command failed with exit code 56.
curl reported:
curl: (56) CONNECT tunnel failed, response 403
So the request to https://google.com was blocked by the current network/proxy path, unlike https://example.com.
Additional information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗