Skip to content

[Bug] #2448 still misses Codex Desktop wait.yield_time_ms (underscore); live Grok 4.6 calls keep 20000.0 #2451

Description

@jeongjin0

Client or integration

Codex App

Area

Tools / MCP / web search

Summary

#2448 closed #2443, but the allowlist it added to src/lib/tool-argument-integers.ts names the wrong field.

Live Codex Desktop wait calls from xAI Grok 4.6 still look like this:

{"cell_id":"358","yield_time_ms":20000.0,"max_tokens":5000.0}

and Codex still rejects them before the tool runs:

failed to parse function arguments: invalid type: floating point `20000.0`, expected u64 at line 1 column 40
failed to parse function arguments: invalid type: floating point `5000.0`, expected usize at line 1 column 36

#2448 scoped repair to the bare wait tool, which is the right boundary, but it allowlisted yield-time_ms (hyphen). The advertised schema and the live arguments both use yield_time_ms (underscore). max_tokens is already in the wait-scoped set and is not the miss.

Expected: an integral float in bare wait.yield_time_ms / wait.max_tokens is rewritten to an integer, wait continues the exec cell, and a genuine fraction such as 1.5 still fails. Cursor's namespaced yield_time_ms and any other tool's max_tokens stay byte-identical.

This is a follow-up to #2443 / #2448, not a reopen of #2316 (wait_agent.timeout_ms) or #1611.

Reproduction

  1. Route Codex App / Codex Desktop through OpenCodex to xai/grok-4.6.

  2. Start a long-running host command through code-mode exec so it yields with a cell id.

  3. Grok calls the host wait tool with integer intent:

    {"cell_id":"358","yield_time_ms":20000,"max_tokens":5000}

    The provider serializes those fields as 20000.0 / 5000.0.

  4. Observe the parse rejections above. wait does not run. The model retries the same float and the turn stalls on continue.

Live schema advertised in the same session:

{
  "name": "wait",
  "parameters": {
    "type": "object",
    "required": ["cell_id"],
    "properties": {
      "cell_id": { "type": "string" },
      "yield_time_ms": { "type": "number" },
      "max_tokens": { "type": "number" },
      "terminate": { "type": "boolean" }
    }
  }
}

Current origin/dev after #2448:

const U64_NUMBER_FIELDS_BY_TOOL = new Map<string, ReadonlySet<string>>([
  ["wait", new Set(["yield-time_ms", "max_tokens"])],
]);

tests/tool-argument-integers.test.ts currently locks the hyphenated name and even asserts that yield_time_ms with tool identity "wait" must stay 60000.0. That test encodes the miss.

Version

Live reject captured on Codex Desktop through local OpenCodex @bitkyc08/opencodex@2.26.0 (loopback 127.0.0.1:10100). The same field name is what #2443 already documented, and origin/dev 81bf4b9a (merge of #2448) still would not rewrite it.

Operating system

macOS (Darwin, Asia/Seoul)

Provider and model

xai / grok-4.6 (OpenCodex-routed Codex App / Codex Desktop host tool surface)

Logs or error output

From Codex session 01a02eb5-7bba-7233-a146-4e0e2219fb80 after the model switched to xai/grok-4.6:

wait {"cell_id":"358","yield_time_ms":20000.0,"max_tokens":5000.0}
failed to parse function arguments: invalid type: floating point `20000.0`, expected u64 at line 1 column 40

wait {"cell_id":"358","yield_time_ms":20000.0,"max_tokens":5000.0}
failed to parse function arguments: invalid type: floating point `20000.0`, expected u64 at line 1 column 40

wait {"cell_id":"358","max_tokens":5000.0}
failed to parse function arguments: invalid type: floating point `5000.0`, expected usize at line 1 column 36

The same session also had earlier integer wait calls (yield_time_ms: 30000) that succeeded. The failure starts when Grok emits the .0 form.

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtoolstool_calls, MCP, web-search / sidecar tools

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions