Cannot reach localhost services from sandbox

Open 💬 10 comments Opened Feb 8, 2026 by danthegoodman1
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

Version 260206.1448 (565)

What subscription do you have?

Plus

What issue are you seeing?

When trying to do things like deploy to locally running convex (docker compose), localhost services cannot be reached from the local sandbox:

$ npx convex dev --once

- Preparing Convex functions...

Retrying request (attempt 3/6)...
Retrying request (attempt 3/6)...
Retrying request (attempt 4/6)...
Retrying request (attempt 4/6)...

What steps can reproduce the bug?

Try to contact localhost services from sandbox by having agent run bash to do so

What is the expected behavior?

Can contact services

Additional information

_No response_

View original on GitHub ↗

10 Comments

etraut-openai contributor · 5 months ago

By default, the sandbox does not allow network access. This is by design. If you want to enable network access, you can do so, but there is some risk of exfiltration. For more details, refer to this documentation. We're working on adding finer-grained networking configurability for sandboxing.

danthegoodman1 · 5 months ago

Thanks, I feel like I recalling it having no issues npm installing though, but maybe I’m misremembering.

danthegoodman1 · 5 months ago

@etraut-openai I'm not finding this is working. I have:

model = "gpt-5.3-codex"
model_reasoning_effort = "high"

[sandbox_workspace_write]
network_access = true

and it's still failing to contact localhost services

danthegoodman1 · 5 months ago

Tested in the Cursor extension as well

etraut-openai contributor · 5 months ago

Reopening. If you're able to repro, please use the /feedback slash command to upload your logs and session details, then post the thread ID here.

danthegoodman1 · 5 months ago
019c3f12-23a8-7b33-b211-e73cdb873cf3

definitely would love to see a copy button for that id, i misclicked before copying and it closed the dialog, so i had to resubmit :/

etraut-openai contributor · 5 months ago

For future reference, you can also get the thread ID from the /status slash command.

jpcody · 5 months ago

Noting I'm having the same issue and same configuration. Feedback thread is 019c4085-0593-7fc0-8aa9-7a5ecfa3f8ca. For me the issue here is Codex not being able to run tests against a dockerized postgres, so the agent can't iterate.

Jadiker · 5 months ago

I'm facing this same issue. Just trying to allow Codex to install packages into a local .venv but it doesn't have internet access despite the project's .codex/config.toml enabling it. Here's my thread id: 019c5554-1d7a-7711-a31b-e56385e42a03.

danthegoodman1 · 3 months ago

Is there any update on this? Not only can it not reach localhost, but it can't reach anything. I still have the minimal config above, but commands like terraform still fail to run in the sandbox