fix(proxy): strip replayed tool call namespaces - #1578
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 723199c44f
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d360e9b5d
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…aced-function-call
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Strip local-only
namespacemetadata from replayed Responses tool-call items at the final upstream wire boundary while retaining the original namespaced items for local replay deduplication. This prevents Codex histories from repeatedly failing withUnknown parameter: input[*].namespaceover both HTTP and WebSocket transports.Type of change
fix:— bug fix (no behavior change beyond the bug)feat:— new user-facing feature or capabilityrefactor:— internal refactor (no behavior change, no API change)docs:— documentation onlychore:/ci:/build:— tooling, CI, packagingtest:— test-only changeLinked issue: Refs #1450 — partial fix for the replayed
input[*].namespacefailure family. The separate replayed localitem_*ID validation failures reported in #1450 remain out of scope, so this PR intentionally does not auto-close the issue.Root cause and scope
Responses request parsing intentionally preserves unknown fields for forward compatibility and local proxy behavior. Current Codex histories can replay namespaced
function_callandcustom_tool_callitems, but the upstream Responses input schema rejectsnamespaceon historical call items. Once such an item is retained in history, forwarding it unchanged makes every retry fail at the same input index.The fix is deliberately type-aware and copy-on-write:
namespaceonly from recognized replayed call items:function_call,custom_tool_call, andapply_patch_call.namespace, which would corrupt reserved top-leveltype: "namespace"tool definitions.item_*IDs in this PR.OpenSpec
response.createframing) and preserves upstream-equivalent behaviorChange directory:
openspec/changes/fix-replayed-namespaced-function-call/The change records the wire-compatibility requirement, local-identity invariant, HTTP/compact/WebSocket scenarios, design trade-offs, and completed implementation tasks.
Changes
namespaceon the upstream copy./v1/responsesforwarding.response.createframe.Simplicity
.env.example, dashboard, or navigation changesTest plan
openspec validate --specsreports 47 passing specs and two pre-existing failures in unchanged main specs:api-keysrequirement 45 lacks a SHALL/MUST keyword.conversations-apirequirements 4 and 5 lack SHALL/MUST keywords.This PR does not modify either capability.
Live verification
The originally failing path was exercised against the local
codex-lbWebSocket route withmodel=codex-auto-review:An actual escalated
git fetch upstream mainthen passed automatic approval and executed successfully. Subsequentcodex-auto-reviewrequest-log rows were recorded withtransport=websocketandstatus=success.Screenshots / output
Not applicable — backend-only proxy wire-compatibility fix with no dashboard-visible changes. The before/after live output is included above.
Checklist
<type>(<scope>)?: <subject>).openspec validate --specspasses and/opsx:verifyis clean — blocked only by the two unchanged baseline spec errors documented above; strict change validation and task verification pass.CHANGELOG.mdis not edited by hand.