Repository navigation
[PR] fix: keep CommandCode proxy tool calls inside the loop - #6627
Merged
ranxianglei merged 1 commit intoNov 14, 2026
Merged
Conversation
Owner
|
Superseded by #6677 (merged as Landed into master via the real merge commit The fix for #6625 is now in master. Closing this PR as superseded — thanks for the careful, well-tested fix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6625
Problem
The CommandCode adapter omitted four existing proxy-owned tool names from its static classification:
acp_retire,acp_restore,acp_rewrite, andacp_cache. It replayed their calls and the round'sfinishto the client as though the client owned those tools. Core dispatch still executed the enabled proxy operations and sent their receipts upstream, so a proxy-only response reached the client astool-call → finish → continuation text → finish.This exposes internal calls and terminates the client stream before the continuation answer has arrived.
Changes
Add the four names to CommandCode's existing proxy-tool set, matching the OpenAI and Google handling introduced with #5765 / #5774. Proxy-only rounds now remain inside the loop; the client receives the continuation text followed by one terminal frame. Mixed rounds still replay real client-tool lines byte-for-byte.
The core's existing block-ops opt-in gate is unchanged. Disabled operations do not mutate blocks or trigger an internal continuation. Existing compress/custom-absorb handling and ordinary client-tool passthrough remain covered.
Validation
runCompressLoopcases send loopback HTTP continuations and verify retire/restore/rewrite state changes or a cache-report receipt, exact call/result correlation, retained original transcript bytes, and the final client JSONL event sequence.git diff --checkpass.The Codex E2E prerequisite check found the installed CLI and built artifact, but the configured real upstream at
127.0.0.1:8199is unreachable here. The gated live four-phase suite was not run; the new loopback HTTP coverage and existing real proxy endpoint tests are local results, with the full repository regression left to hosted CI.Prior work
All-state repository and author-history searches found no existing CommandCode repair for this omission. #5774 changed the OpenAI and Google adapter sets, not CommandCode; #1444 / #6032 introduced the CommandCode wire. This patch adds no new tool or kernel/configuration behavior.