You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
• Ran curl localhost:8081
└ % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0
curl: (7) Failed to connect to localhost port 8081 after 0 ms: Couldn't connect to server
> Ran curl localhost:8081 in this environment and it still returns curl: (7) Failed to connect to localhost port 8081; there’s no listener on 8081 inside
the sandbox.
⋊> ~/c/tr on dev ⨯ codex (base) 12:59:13
╭────────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.41.0) │
│ │
│ model: gpt-5-codex high /model to change │
│ directory: ~/code/tr │
╰────────────────────────────────────────────────╯
To get started, describe a task or try one of these commands:
/init - create an AGENTS.md file with instructions for Codex
/status - show current session configuration
/approvals - choose what Codex can do without approval
/model - choose what model and reasoning effort to use
▌ can you try `curl localhost:8081`
• Ran curl localhost:8081
└ % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0
curl: (7) Failed to connect to localhost port 8081 after 0 ms: Couldn't connect to server
> curl localhost:8081 couldn’t connect—connection refused on port 8081. If something should be running there, make sure the service is up first.
▌ Implement {feature}
tried with both network_access = false and network_access = true
config.toml
⋊> ~/c/tr on dev ⨯ cat $HOME/.codex/config.toml (base) 13:00:17
model = "gpt-5-codex"
model_reasoning_effort = "high"
[projects."/home/koshy/code/tr"]
trust_level = "trusted"
[projects."/home/koshy/code/lt"]
trust_level = "trusted"
network_access = false
Activity
seratch commentedon Sep 26, 2025
Adding
network_access = falseto your$HOME/.codex/config.tomlmay help. Refer to https://github.com/openai/codex/blob/main/docs/config.md for more details.koshyviv commentedon Sep 26, 2025
That didnt help either
tried with both
network_access = falseandnetwork_access = trueconfig.toml
koshyviv commentedon Sep 26, 2025
I was able to run with this
codex --sandbox danger-full-access- but seems a little too unsafe if im directly running it on my laptop.[-]Codex cannot cURL[/-][+]Codex cannot cURL localhost APIs[/+]corpuser commentedon Oct 13, 2025
Figured this out, @koshyviv your config should be this instead
jrmlhermitte commentedon Oct 23, 2025
I ran into this for for a python test. I believe it's a similar issue. See comment here
etraut-openai commentedon Jan 17, 2026
Closing out old bugs.