Skip to content

Attribute network approvals to parent tool items in core#15594

Open
charley-oai wants to merge 8 commits intomainfrom
cc/network-approval-parent-tool-item-core
Open

Attribute network approvals to parent tool items in core#15594
charley-oai wants to merge 8 commits intomainfrom
cc/network-approval-parent-tool-item-core

Conversation

@charley-oai
Copy link
Copy Markdown
Contributor

@charley-oai charley-oai commented Mar 24, 2026

Summary

  • carry the existing parent_tool_item_id through the managed network proxy path instead of inferring ownership from the global active-call set
  • attribute blocked network requests back to the exact owning tool call in core, including the CONNECT limited-mode REASON_MITM_REQUIRED block path
  • keep the small proxy-side cleanup and focused regression coverage in the same branch

Why This PR Exists

Today core can only attribute a blocked network request when there is exactly one active tool call. This branch moves attribution into the managed proxy path itself so blocked requests carry the owning parent tool item id back into core without ordering heuristics.

Verification

  • cargo test -p codex-network-proxy
  • cargo test -p codex-network-proxy http_connect_accept_blocks_in_limited_mode
  • local codex-core / codex-tui-app-server validation was partially rerun while splitting, but I stopped broad/local runs once they stopped giving incremental signal and am relying on PR CI for the full matrix

charley-oai and others added 4 commits March 23, 2026 19:12
Thread a stable network owner id through managed proxy credentials and use it to resolve the exact active tool call for blocked network requests. This makes concurrent network approvals attribute deterministically and preserves parent tool item ids downstream.

Co-authored-by: Codex <noreply@openai.com>
Remove the synthetic network approval token and carry parent_tool_item_id directly through the managed proxy attribution path.

Co-authored-by: Codex <noreply@openai.com>
Bundle proxy-disabled response parameters into a single typed args struct so the callsites stay readable and clippy stops flagging the helper for too many arguments.

Co-authored-by: Codex <noreply@openai.com>
Restore the parent tool item id field and helper on guardian network approvals, and wire the begin_network_approval callsite to pass the tool call id after splitting the work into stacked branches.

Co-authored-by: Codex <noreply@openai.com>
charley-oai and others added 2 commits March 23, 2026 19:35
Keep the core-only PR focused by explicitly ignoring the new network approval parent field in the existing guardian action JSON pattern matches.

Co-authored-by: Codex <noreply@openai.com>
Drop the unused protocol-formatting helper from the core-only branch so clippy does not fail on dead code after the PR split.

Co-authored-by: Codex <noreply@openai.com>
@charley-oai
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b45bbe8278

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

charley-oai and others added 2 commits March 23, 2026 19:57
Propagate the extracted parent tool item id through the CONNECT limited-mode MITM-required block path so core can attribute the denial to the correct active tool call. Also derive PartialEq/Eq for BlockedRequest to keep the focused regression test as a full-object assertion.

Co-authored-by: Codex <noreply@openai.com>
Add the new parent tool item id field to the remaining network access guardian test fixture on the core-only branch.

Co-authored-by: Codex <noreply@openai.com>
@charley-oai
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Another round soon, please!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

1 participant