Through the Claude subscription bridge, Codex desktop's browser tool
mcp__cua_repl__js never reached a Claude model; mcp__cua_repl__js_reset
did. The tools.json the run's Claude Code is handed carried each
inputSchema as the client sent it, and cua_repl__js's is a oneOf of
objects at the root, which Anthropic's API refuses, so Claude Code left
the tool out.
bridgeTools, the one place the bridge's tools are built (the first
tools.json and the tools a ToolSearch loads mid-turn), now folds each
schema with objectSchema / provider.ObjectRoot, as every Messages request
magpie builds already is (anthropic.go) and as the gateway does for
relays and xAI (object_root.go): the variants' properties merged, a field
every variant requires stays required, allOf's required all kept. A
schema with an object root goes byte for byte as it came. The checks of
a call against the original schema (answer tool) are unchanged.
Paths checked: Messages built from a translated request (objectSchema in
anthropic.go), a Messages body passed through (objectRootsBody, folded
for every upstream), Chat/Responses to relays (foldsRoots + retry on
rootUnionRefusal), Grok (grokBody). The bridge was the only one left.
Run (mote, at 48bea11dc): gofmt; go vet ./internal/gateway on darwin,
linux (nogui, CGO off) and windows; go test -run
'TestClaudeBridge|ObjectRoot|OneOf|BridgeTools|ToolNames'
./internal/gateway: ok.
Broken by hand: without the objectSchema line in bridgeTools,
TestClaudeBridgeToolsHaveObjectRoots fails (oneOf/anyOf/allOf kept at
the root, type missing).
Not tried: a real Codex desktop with the cua browser plugin and a real
Claude Code run; the whole internal/gateway package is queued behind
mote's suite lock and runs after the tag.