openai / openai/codex

MCP numeric elicitation falls back to approval and submits empty content

Open
#41,797 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI mcp TUI
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

Codex version

  • codex-cli 0.151.0
  • Also reproducible from current main at a9519cbcdd2d664530edb2469224ee03c1056799
  • Interactive TUI on macOS
  • MCP session negotiated protocol 2026-07-28; form elicitation is enabled

Reproduction

Have an MCP server return an input_required tool result containing a form elicitation whose required property is an integer:

{
  "mode": "form",
  "message": "How many scoops? (1-3)",
  "requestedSchema": {
    "type": "object",
    "properties": {
      "scoops": {
        "type": "integer",
        "minimum": 1,
        "maximum": 3,
        "description": "How many scoops? (1-3)"
      }
    },
    "required": ["scoops"]
  }
}

Codex renders this generic approval dialog, with no way to enter the integer:

eledev needs your approval.

Server: eledev

How many scoops? (1-3)

1. Yes, provide the requested info (y)
2. No, but continue without it (esc)
3. Cancel this request (esc)

Choose Yes.

Actual behavior

Codex sends an accepted response with empty content:

{"action":"accept","content":{}}

Because the required scoops field is absent, the server correctly returns the same input_required result again. This creates a dead end/loop: the UI offers acceptance but provides no way to supply a valid response.

String and boolean elicitation fields in the same multi-round tool call render and submit correctly.

Expected behavior

Codex should render number/integer inputs and submit their values, including normal validation for constraints such as minimum and maximum.

If numeric input is not supported, the UI should not offer an Accept action that can only submit invalid empty content.

Source evidence

In codex-rs/tui/src/bottom_pane/mcp_server_elicitation.rs, parse_field explicitly maps McpElicitationPrimitiveSchema::Number(_) to None. The test unsupported_numeric_form_falls_back codifies the current fallback behavior. The fallback choices in approval_overlay.rs then turn Yes, provide the requested info into an accepted response without any field content.

Related: #23383 reports the same invalid accept + content: {} symptom through auto-approve. This report is the interactive TUI path: a supported MCP primitive is discarded by the form renderer and replaced with a content-less approval dialog.

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 in codex-rs/tui/src/bottom_pane/mcp_server_elicitation.rs, reading parse_field and the unsupported_numeric_form_falls_back test. Trace how the fallback reaches approval_overlay.rs and produces an accepted response with empty content. Done means numeric and integer fields can be entered and validated against constraints, or the UI no longer offers an invalid Accept action; run the relevant elicitation tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.