Skip to content

Include enclosing tool context in nested Guardian approvals - #61946

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/9c44a0e8f29f84f84a5322b8362f910f2c91ac55
Nov 17, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/9c44a0e8f29f84f84a5322b8362f910f2c91ac55

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Include enclosing tool context in nested Guardian approvals

Why

A nested MCP approval can arrive while its enclosing tool invocation is still running. Follow-up Guardian reviews may use a transcript delta that no longer includes that invocation, leaving out the context in which the nested action was requested.

What changed

  • Add the disabled-by-default guardian_nested_approval_context feature to include the host-verified enclosing tool name and arguments in synchronous nested approval requests, while preserving the nested action as the action under review.
  • Match the enclosing invocation by call ID and omit ambiguous or unavailable evidence. Exclude Node REPL JavaScript preflight requests.
  • Admit enclosing-call context only when it fits the remaining fixed or elastic budget, without displacing ordinary transcript evidence or screenshots.

Testing

Add MCP elicitation coverage and a request-history snapshot for independent nested reviews and transcript deltas. Add tests for call-ID matching, budget-based omission, and screenshot priority.

## Why

A nested MCP approval can arrive while its enclosing tool invocation is still running. Follow-up Guardian reviews may use a transcript delta that no longer includes that invocation, leaving out the context in which the nested action was requested.

## What changed

- Add the disabled-by-default `guardian_nested_approval_context` feature to include the host-verified enclosing tool name and arguments in synchronous nested approval requests, while preserving the nested action as the action under review.
- Match the enclosing invocation by call ID and omit ambiguous or unavailable evidence. Exclude Node REPL JavaScript preflight requests.
- Admit enclosing-call context only when it fits the remaining fixed or elastic budget, without displacing ordinary transcript evidence or screenshots.

## Testing

Add MCP elicitation coverage and a request-history snapshot for independent nested reviews and transcript deltas. Add tests for call-ID matching, budget-based omission, and screenshot priority.

GitOrigin-RevId: 9c44a0e8f29f84f84a5322b8362f910f2c91ac55
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/9c44a0e8f29f84f84a5322b8362f910f2c91ac55 branch from f7f8016 to 0637230 Compare November 17, 2026 02:32
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@copyberry
copyberry Bot merged commit 0637230 into main Nov 17, 2026
8 of 23 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-17T02:32:12.851296Z f7f8016 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/9c44a0e8f29f84f84a5322b8362f910f2c91ac55 branch November 17, 2026 02:32
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 17, 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.

1 participant