fix(codex): consolidate repeated Responses namespaces - #95
Open
matt1060338871-pixel wants to merge 2 commits into
Open
fix(codex): consolidate repeated Responses namespaces#95matt1060338871-pixel wants to merge 2 commits into
matt1060338871-pixel wants to merge 2 commits into
Conversation
matt1060338871-pixel
marked this pull request as ready for review
September 11, 2026 09:22
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.
Summary / 概述
Fix native Responses requests rejected with
Duplicate namespace name 'mcp__...'after Codex discovers tools in the same namespace more than once, including inherited conversation history.Root Cause and Scope
Codex retains separate
tool_search_outputrecords. OpenCode Go's native Responses gateway registers their namespace declarations request-wide and rejects repeated names. The shared third-party Responses preparer forwarded those declarations unchanged. Its passthrough is traceable to1fda7d1dafa564481df2fbc717e9c96225da7937(August 30); this is evidence of a compatibility gap, not proof that that commit introduced the observed regression. The existing namespace-flattening adapter is xAI-specific and should not be broadened for this different error.This patch runs in the shared production/probe Responses preparer, gated by parsed URLs for OpenCode Go (
opencode.ai/zen/go/v1) and direct DeepSeek (api.deepseek.com). Live before/after verification was performed against OpenCode Go; the direct DeepSeek gate has unit/contract coverage and a separately reported matching failure, but was not live-tested with direct DeepSeek credentials.What Changed
toolsand immediateinput[].tool_search_output.tools, keeping the union of function declarations at the first occurrence.call_idrepair.Verification
mcp__hindsight,mcp__websearch, andmcp__codex_apps__plugin_managementeach returned HTTP 400 before normalization and HTTP 200 after normalization. The executable used the production Rust source, not a Python reimplementation.function_callwithnamespace: mcp__hindsight,name: read, both for the single-discovery control and normalized repeated discoveries. A normalized request containing prior function-call/output history also returned HTTP 200.cargo fmt --check --manifest-path src-tauri/Cargo.tomlpassed.cargo clippy --manifest-path src-tauri/Cargo.toml --lib --no-default-features -- -D warningspassed.The patched desktop executable was installed locally and restarted without a version bump or public binary release. Four raw, unnormalized requests through the installed localhost proxy passed: repeated Hindsight, websearch, and plugin-management discovery each completed with HTTP 200; automatic tool invocation also completed with the expected qualified function call. The provider-module suite passed all 1,101 tests.
After installation, the user retried the original affected desktop task and confirmed that the conversation recovered. This is user-confirmed original-task recovery in addition to the installed-proxy tests above. An earlier CLI resume attempt was blocked locally by the desktop's active-writer lock and did not send an upstream request. No conversation history or writer locks were modified.
Related Issue / 关联 Issue
N/A. User-reported native Responses failure; intentionally separate from malformed delegation outputs missing
call_id.Screenshots / 截图
N/A: protocol-only change. Reproduction and before/after evidence are described above without exposing private task history.
Checklist / 检查清单
pnpm typecheckpasses / Not run: no frontend changes.pnpm format:checkpasses / Not run: Rust formatting checked separately.-D warnings; full application/binary Clippy was not run.