Skip to content

Clarify network approval auto-review prompts#19907

Merged
maja-openai merged 2 commits intomainfrom
maja/auto-review-network-request
Apr 28, 2026
Merged

Clarify network approval auto-review prompts#19907
maja-openai merged 2 commits intomainfrom
maja/auto-review-network-request

Conversation

@maja-openai
Copy link
Copy Markdown
Contributor

Why

Network access approval prompts were showing the generic retry reason, which made auto-review focus on the blocked connection instead of the command that caused it. This makes network approvals easier to assess by telling the reviewer to evaluate whether the triggering command was authorised by the user and within policy, and to treat the network call as acceptable when it is a reasonable consequence of that command.

What changed

  • Split guardian approval request prompt rendering so NetworkAccess has a dedicated branch.
  • For network requests, show Network approval context and Network access JSON instead of Retry reason / Planned action JSON.
  • Added regression coverage for the network approval prompt wording and for omitting retry reason in this case.

Verification

  • cargo test -p codex-core guardian::tests::build_guardian_prompt_items_explains_network_access_review_scope

@maja-openai maja-openai marked this pull request as ready for review April 28, 2026 02:00
@maja-openai maja-openai requested a review from a team as a code owner April 28, 2026 02:00
Copy link
Copy Markdown
Collaborator

@dylan-hurd-oai dylan-hurd-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! could we add a snapshot test for this as well?

@maja-openai maja-openai force-pushed the maja/auto-review-network-request branch from 03fc0b7 to d1789a7 Compare April 28, 2026 03:51
@maja-openai maja-openai marked this pull request as draft April 28, 2026 03:52
@maja-openai maja-openai marked this pull request as ready for review April 28, 2026 03:54
@maja-openai maja-openai force-pushed the maja/auto-review-network-request branch from d1789a7 to b7beaa7 Compare April 28, 2026 03:58
@maja-openai maja-openai marked this pull request as draft April 28, 2026 03:58
@maja-openai maja-openai force-pushed the maja/auto-review-network-request branch from b7beaa7 to 2856cd0 Compare April 28, 2026 04:04
@maja-openai maja-openai marked this pull request as ready for review April 28, 2026 04:04
@maja-openai maja-openai force-pushed the maja/auto-review-network-request branch from c1f698f to 62d1c5f Compare April 28, 2026 16:32
@maja-openai
Copy link
Copy Markdown
Contributor Author

maja-openai commented Apr 28, 2026

[codex] Addressed in the latest branch updates: this PR now includes an insta snapshot test for the network access guardian prompt layout (codex_core__guardian__tests__network_access_guardian_prompt_layout).

@maja-openai maja-openai merged commit 273c2e2 into main Apr 28, 2026
25 checks passed
@maja-openai maja-openai deleted the maja/auto-review-network-request branch April 28, 2026 17:25
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants