Repository navigation
refactor: remove two Codex patches for MCP calls and tool results - #6092
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
jbeckwith-oai
left a comment
There was a problem hiding this comment.
Reviewed the complete patch-series changes and surrounding MCP retry/timeout handling and native interception. Moving the existing box around the complete tools/list operation preserves execution and cancellation behavior. The shared predicate retains the same five default-namespace executor tools across Core policy, profile permissions, and Python interception. No actionable findings after coordinator and independent static review.
Hosted CI: 37 successful checks, 9 skipped. No candidate code or local tests executed.
Why
The Python SDK has been carrying two Codex patches to raise a Rust build limit and add two names to a tool check. This PR removes both by moving one existing box in the MCP client and sharing one tool check across the engine and the Python binding.
Summary
tools/listcall keeps the build within the stock limit of 128. The first successful attempt still uses one box. Retries share it. An early error can now allocate the box before the first attempt.project_globandproject_grepto the tools whose results the host can filter. The profile already checks for all five tool names in the default namespace. Core now uses that check before it asks any contributor to handle the result. The Python binding uses the same check for tool selection and result handling.The series drops from 110 engine patches to 108 at the same Codex pin. It keeps the three RMCP patches, bringing the total from 113 to 111 patch files.
Test plan
I built release wheels for the base (
7629523b) and this commit (604e01a9) in separate, empty Cargo target directories. Both used the same toolchain and profile. I traced each changed Rust file through the build and checked the hash of the native library each caller loaded. All test bodies in the patched source match the base.make tests. Both had 12,872 passes and 105 skips, with the same test IDs and skip reasons.Failures and retries
retained_compaction, passed five times and failed twice on each wheel. Both failed before restore, when the SDK tried to match a reasoning item to its saved form. A local provider reproduced the error on both withcontent: []. Both passed when the provider sentnullor omitted the field. In separate live checks, the field was absent from the failing snapshots on both wheels. The raw provider response is unknown.NativeErrorwhen the caller cancelled as soon as the reply was lost. With a 50 ms delay, cancellation returned and session close raisedRuntimeError. Each outcome held in all ten trials per wheel.An earlier run used wheels built with warm Cargo caches and a read-only base checkout. It had 106 failures on the base and 108 on this commit. Four cases differed. The receipt check passed with each wheel's own manifest. The steering test read an empty heartbeat file once on this commit, then passed 20 times per wheel. The zero-second history expiry and lost start reply tests failed on both in repeated runs.
Issue number
None.
Checks
AGENTS.md, including.agents/skills/code-change-verification/scripts/run.shwhen requiredAGENTS.md