Codex Desktop sends invalid strict tool schemas (list_threads / list_archived_threads) - upstream rejects with 'Missing limit'
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
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:
opencode→https://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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the Codex Desktop built-in tool definitions under vscode/desktop, focusing on list_threads, list_archived_threads, read_thread, and wait_threads. Reproduce the schema against the Responses API endpoint, then verify that every object schema either lists all property keys in required or is not marked strict, and that strict-provider requests succeed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json, rust
- Domain
- api, desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100