ac4af582301a4e8a29245dbba767eba31334ddf9
1
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
3b961f2949 |
gateway: a relayed Responses reply says a namespaced call's arguments are not sealed, so Codex V2 hands the subagent its task (#3183)
Codex offers its collaboration tools in a namespace, and marks spawn_agent's message "encrypted". On a vendor serving the Responses API natively the request is relayed as it came, and the vendor's reply went back as it came too: the function_call for collaboration.spawn_agent reached Codex with its plain-text arguments and no encrypted_function_args field at all. Codex reads a namespaced call as DirectPlaintextMessage only when that field is there and empty (tools/router.rs, rust-v0.163.0), so it took the task for sealed, wrapped the plain text in an encrypted_content of its own, and the subagent — asked over that — replied "tell me the task" and did nothing. The translated path has said "not sealed" since #613 (callTo's encrypted_function_args []), and the Grok and Zed relays have had it through nsTidy since #404; the relay to any other vendor is the branch left out. What changed: the namespaced tools a Responses request offers are now read on every relay, not only Grok's and Zed's, and a call that comes back with its namespace named is answered with the empty encrypted_function_args list when it carries none. A call carrying a seal — OpenAI's own, or any upstream that answers the mark — goes back with that seal untouched, and calls to tools outside every namespace say nothing about seals either way. The field Codex replays of it in a later turn's history is still what forVendor leaves out of what a non-OpenAI vendor is asked (openaiOnly), so the loop closes without the vendor ever seeing it. TestNativeRelayNamespacedCallSaysUnsealed relays a request with the collaboration namespace to a stub vendor whose reply carries the call streamed and whole, and reads every function_call Codex would see: both shapes say the arguments are plain text, and the namespace went up as Codex sent it (the request was relayed, not translated). Without the fix the call arrives with no encrypted_function_args. TestNativeRelayLeavesOtherCallsBe holds a sealed call's seal and leaves a plain call alone. Run: go test ./internal/gateway -count=1 ok (322s); the new tests and the #404/#613 namespace tests green with and without -race; gofmt -l clean; go vet of the package clean; CGO_ENABLED=0 go build -tags nogui for darwin/arm64, linux/amd64 and windows/amd64. Not tried against the reporter's vendor; the stub's reply is the shape their probe recorded (namespace and plain arguments kept, no encrypted list). Generated-by: GLM-5.3-Flash (ZCode) Landed from ggbdpq's branch (patch posted on the issue; sha256/patch-id checked against the issue) by yetone, rebased on origin/main 2026-11-03. Run at the pushed tree, on mote (macOS): go test -tags nogui -count=1 of internal/gateway with -run over this batch's tests and their families (PlainSchema, Antigravity, AutoMode, WebP, ClaudeTUI, NativeRelay, Namespace, Grok, Zed, Codex, ClinePass, rewrite) ok; -race -count=3 of the new tests ok; GOOS=linux and GOOS=windows go vet of internal/gateway and gofmt -l clean. The full gateway-and-importers run, started at an earlier base, was still running at the push; its reds get issues. Changed in review: the widening is to every Responses relay except OpenAI's own (openai.com, Azure) and a ChatGPT account (accountAgent codex), whose replies go back as they came; OpenAI answers the seal itself, and this does not add the empty list to its replies. TestSealsItsOwnIsOpenAIOnly holds the exclusion (sealsItsOwn); with the openai.com and Azure checks taken out its OpenAI and Azure rows go red. Broken by hand: the product change reverted, TestNativeRelayNamespacedCallSaysUnsealed red; restored, green. Not tried against the reporter's vendor or a real Codex V2 subagent. |