openai / openai/codex

App tool schemas omit list_threads/read_thread maxima, causing deterministic retries

Open
#40,232 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app app-server bug tool-calls
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

Version

Codex Desktop 26.818.41509, bundled command runner 0.149.0-alpha.4.1, Windows.

Problem

The app-hosted tool schemas expose numeric pagination parameters without machine-readable maxima:

  • list_threads.limit?: number
  • read_thread.turnLimit?: number

The descriptions say only "Maximum number..." but do not state the actual limits. The server then rejects:

  • list_threads({limit: 100}): maximum is 50
  • read_thread({turnLimit: 20, ...}): maximum is 10

An agent auditing task history has no schema signal that these otherwise reasonable values are invalid, so it spends a failed tool call and another model turn discovering each hidden contract.

Expected behavior

Publish the server constraints in the generated JSON Schema and prose:

  • list_threads.limit.maximum = 50
  • read_thread.turnLimit.maximum = 10

Include defaults/minima where applicable, and keep host validation and callable schema generated from the same source so they cannot drift.

Why this matters

These are deterministic, preventable failures. Complete schemas let the client/model choose a valid request on the first attempt and avoid retry-token amplification. No private task data or local paths are needed to reproduce.

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 by tracing the generated JSON Schema and the app-hosted tool schema for list_threads and read_thread, then locate the shared source used by host validation and callable schema generation. Verify that the published schema and prose expose maxima of 50 and 10, respectively, along with applicable defaults and minima, and that validation and schema output remain aligned.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.