Skip to content

Add conditional network proxy prompt guidance#19176

Open
viyatb-oai wants to merge 3 commits into
mainfrom
codex/viyatb/add-network-proxy-prompt-updates
Open

Add conditional network proxy prompt guidance#19176
viyatb-oai wants to merge 3 commits into
mainfrom
codex/viyatb/add-network-proxy-prompt-updates

Conversation

@viyatb-oai
Copy link
Copy Markdown
Collaborator

@viyatb-oai viyatb-oai commented Apr 23, 2026

Why

When a network proxy is active, the model needs enough context to keep proxy routing intact, distinguish explicit policy denials from ordinary network failures, and know when to request more network permission instead of trying to work around the sandbox. Without that guidance, it can misread proxy-mediated failures or override the environment that is enforcing policy.

What changed

  • Add a dedicated # Network Proxy section to the permissions instructions bundle when the current turn actually has an active proxy.
  • Teach the model to honor <network> allow/deny entries, preserve proxy-related environment variables, and request more network permission for hosts outside policy.
  • Spell out the useful denial signals (blocked-by-allowlist, blocked-by-denylist, and local/private target blocks) while clarifying that proxy-mediated clients can also time out or hang, so generic failures alone are not proof of a proxy denial.
  • Keep the prompt plumbing explicit by grouping the feature-dependent render flags in PermissionsInstructionOptions.

Testing

  • cargo test -p codex-core includes_network_proxy_guidance_when_proxy_is_active
  • cargo test -p codex-core permissions_message_includes_writable_roots
  • cargo clippy -p codex-core --all-targets -- -D warnings

Comment thread codex-rs/core/src/context/permissions_instructions.rs Outdated
@viyatb-oai viyatb-oai force-pushed the codex/viyatb/add-network-proxy-prompt-updates branch 2 times, most recently from 350e69e to 6137d0b Compare May 1, 2026 15:38
viyatb-oai and others added 2 commits May 1, 2026 09:57
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex noreply@openai.com
@viyatb-oai viyatb-oai force-pushed the codex/viyatb/add-network-proxy-prompt-updates branch from 6137d0b to 8cd5eec Compare May 1, 2026 16:57
Co-authored-by: Codex noreply@openai.com
@viyatb-oai viyatb-oai changed the title Add network proxy prompt guidance Add conditional network proxy prompt guidance May 1, 2026
@viyatb-oai viyatb-oai marked this pull request as ready for review May 1, 2026 21:11
@viyatb-oai viyatb-oai requested a review from a team as a code owner May 1, 2026 21:11
@github-actions
Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this May 16, 2026
@viyatb-oai viyatb-oai reopened this May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants