openai / openai/codex

Desktop codex_app MCP tools break strict Responses providers (Meta): Recursive JSON schemas not supported

Open
#44,144 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug custom-model mcp windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What

On ChatGPT/Codex Desktop (Windows, app 26.903.8094.0, bundled codex 0.153.4), any request with model routed to Meta's Responses API via OpenCode Go (muse-spark-1.3-contributor, https://opencode.ai/zen/[go/v1/responses](https://www.golinks.io/v1/responses?trackSource=github)) fails immediately, before any tool executes:

Error from provider (Console Go): Upstream request failed: [invalid_request_error] Recursive JSON schemas are not currently supported

Meta documents that recursive schemas return HTTP 400 (https://ai.developer.meta.com/docs/features/structured-output). GPT models accept the same request fine.

Desktop-only

Same machine, same codex version (bundled 0.153.4 binary), same config/model/provider: codex exec succeeds (PROVIDER_OK). Only Desktop fails. The delta between CLI and Desktop is the Desktop-injected mcp_servers.codex_app (automation_update, create_thread, send_message_to_thread, fork_thread, handoff_thread) plus Desktop-managed node_repl. All user MCP servers disabled, all [plugins] identical in the passing CLI run. By elimination the recursive $ref comes from the Desktop-only app tools (nested message/thread content shapes are the classic pattern).

Ask

Either sanitize recursive $refs in tool schemas before sending (inline local refs / replace cycles with permissive object, cf. anomalyco/opencode#29295 / #16910), or support user-side disabling of codex_app tools. Currently a user-side [mcp_servers.codex_app] table without full transport is rejected (invalid transport), and the table is injected via -c so it can't be overridden from config.toml.

Repro

  1. Provider with wire_api=responses pointing at a strict Meta endpoint, model muse-spark-1.3-contributor + model_catalog_json entry.
  2. Desktop: send anything (even 'yo') -> instant invalid_request_error.
  3. Same binary CLI exec -> works.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Desktop-injected mcp_servers.codex_app tools and compare their schemas and request path with the passing codex exec entry point. Reproduce against a strict Meta Responses provider, then verify that the Desktop request succeeds without recursive schemas or that codex_app tools can be disabled while the CLI behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, desktop, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.