Codex Desktop sends invalid strict tool schemas (list_threads / list_archived_threads) - upstream rejects with 'Missing limit'

Open 💬 1 comment Opened Aug 22, 2026 by rngt713-art
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Summary

Codex Desktop (0.149.0-alpha.4.1) sends its built-in thread-management tools
(e.g. list_threads, list_archived_threads) with JSON Schemas that set
additionalProperties: false but omit required (or do not list every
property key). OpenAI-compatible upstreams that enforce strict-mode schema
validation reject the whole request. Through the OpenCode Go gateway
(https://opencode.ai/zen/go/v1, wire_api = "responses") the request fails
with:

Error from provider (Console Go): Upstream request failed: [invalid_request_error] 'required' is required to be supplied and to be an array including every key in properties. Missing 'limit'.

Environment

  • Codex Desktop 0.149.0-alpha.4.1 (Windows 11, x64), source: vscode/desktop
  • Custom provider: opencodehttps://opencode.ai/zen/go/v1, wire_api = "responses"
  • Model: muse-spark-1.2-contributor (model catalog entry in ~/.codex/models.json)

Root cause

The tool definitions bundled with the desktop app look like this (found in the
app bundle):

// list_threads
{
  type: "function",
  name: "list_threads",
  inputSchema: {
    type: "object",
    additionalProperties: false,
    properties: {
      limit: { type: "integer", minimum: 1, maximum: 50, description: "..." }
    }
    // no "required" array at all
  }
}

Strict-mode validators require every key in properties to appear in
required. The desktop schemas violate that at multiple nesting levels
(list_threads, list_archived_threads, read_thread, wait_threads, ...).

Direct API reproduction

POST https://opencode.ai/zen/go/v1/responses with
model: "muse-spark-1.2-contributor" and a single tool:

{
  "type": "function",
  "name": "list_threads",
  "description": "List threads and chats across the app.",
  "strict": true,
  "parameters": {
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "limit": { "type": "integer", "minimum": 1, "maximum": 50 }
    }
  }
}

Result:

{
  "error": {
    "param": "parameters",
    "type": "invalid_request_error",
    "message": "Error from provider (Console Go): Upstream request failed: [invalid_request_error] 'required' is required to be supplied and to be an array including every key in properties. Missing 'limit'."
  }
}

Adding "required": ["limit"] makes the same request succeed (HTTP 200).
The same broken schema sent with model: "deepseek-v4-flash" also succeeds,
which shows the validation is upstream-specific (strict backends reject it).

Expected behavior

Either the desktop app should always emit required arrays that include every
key in properties (recursively, for every object schema), or it should not
mark its own tools as strict. Requests to strict OpenAI-compatible providers
should not fail on Codex's own built-in tool schemas.

Notes / related

  • Related issues: #525 (Missing 'workdir'), #7758 ('additionalProperties' is required...)
  • Related PR: #25620 (strict Responses API tool schema validation)
  • The upstream error prefix Error from provider (Console Go) originates from

the OpenCode Go gateway's upstream; see anomalyco/opencode#37231, #43163,
#43557.

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 5 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #39848

Powered by Codex Action