Skip to content

Include nested Apps tool results in Code Mode sampling requests - #62423

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/0983261ac39021099d14efa5c9a9acac47ac9269
Nov 19, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/0983261ac39021099d14efa5c9a9acac47ac9269

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Include nested Apps tool results in Code Mode sampling requests

Why

Result body capture covered direct Apps calls, leaving eligible calls made inside Code Mode without their result bodies in follow-up sampling metadata.

What changed

Capture eligible nested MCP results and bind them to the originating exec or wait output for the current turn. Send tool_result and tool_result_call_id together when both fit the request budget. Keep the bodies out of conversation history and reclaim capture capacity when the output binding is lost.

Require analytics to be enabled and the provider to allow request metadata before starting turn-level capture. Check the call's credentials at dispatch and again when recording the result.

Testing

Add coverage for yielded and finished outputs, late results, retries with replacement output items, capture budget recovery, and the request size boundary for sending the body and call ID together.

## Why

Result body capture covered direct Apps calls, leaving eligible calls made inside Code Mode without their result bodies in follow-up sampling metadata.

## What changed

Capture eligible nested MCP results and bind them to the originating `exec` or `wait` output for the current turn. Send `tool_result` and `tool_result_call_id` together when both fit the request budget. Keep the bodies out of conversation history and reclaim capture capacity when the output binding is lost.

Require analytics to be enabled and the provider to allow request metadata before starting turn-level capture. Check the call's credentials at dispatch and again when recording the result.

## Testing

Add coverage for yielded and finished outputs, late results, retries with replacement output items, capture budget recovery, and the request size boundary for sending the body and call ID together.

GitOrigin-RevId: 0983261ac39021099d14efa5c9a9acac47ac9269
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/0983261ac39021099d14efa5c9a9acac47ac9269 branch from cdd1d16 to b5d9f71 Compare November 19, 2026 03:58
@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-19T03:58:53.837047Z cdd1d16 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 merged commit b5d9f71 into main Nov 19, 2026
10 of 23 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/0983261ac39021099d14efa5c9a9acac47ac9269 branch November 19, 2026 03:59
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 19, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — b5d9f711 Deployed Nov 19, 2026 by devalees via Translate non-English issue #26634
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.

6 participants