network_access permission not working

Resolved 💬 3 comments Opened Sep 11, 2025 by davidak Closed Nov 26, 2025
💡 Likely answer: A maintainer (dylan-hurd-oai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

0.34.0

Which model were you using?

gpt-5

What platform is your computer?

Linux 6.12.45 x86_64 unknown

What steps can reproduce the bug?

I have this in my config.toml:

[projects."/home/davidak/code/agents4science-paper"]
trust_level = "trusted"

# allow network in workspace-write mode
[sandbox_workspace_write]
network_access = true

# full-auto mode
approval_policy = "on-failure"
sandbox_mode    = "workspace-write"

Then i run the prompt:

Write a haiku about being an AI Agent scientist and save it to a Markdown file. It should contain the current lottery numbers (german Lotto 6aus49).

What is the expected behavior?

It should fetch the information from the internet.

What do you see instead?

It asks for permission to use networking.

<img width="1162" height="1031" alt="Image" src="https://github.com/user-attachments/assets/872b66f9-63bf-42b7-b662-24cde30ff372" />

Additional information

_No response_

View original on GitHub ↗

3 Comments

xiang · 11 months ago

This was driving me crazy. I found the fix here: https://github.com/openai/codex/blob/main/docs/sandbox.md

davidak · 11 months ago

@xiang i got the non-working config from there. what did work for you?

dylan-hurd-oai contributor · 10 months ago

@davidak is this still happening on recent versions of codex? and does it still happen if you specify

approval_policy = "on-request"

instead? on-failure is probably not the behavior you're looking for in this case