CLI bug: Codex repeatedly executes a valid sibling after a schema-invalid parallel tool call

Open 💬 2 comments Opened Jun 12, 2026 by N0zoM1z0

What version of Codex CLI is running?

Codex CLI 0.137.0

What subscription do you have?

N/A. The reproduction uses a local OpenAI-compatible mock provider and a fake API key.

Which model were you using?

gpt-4 in the local mock-provider replay.

What platform is your computer?

Linux x86_64 in Docker (node:24-bookworm)

What terminal emulator and version are you using (if applicable)?

Non-interactive Docker/CI shell.

Codex doctor report

Not available in this minimal Docker reproduction.

What issue are you seeing?

In a parallel-tool response, one tool call has schema-invalid arguments while a sibling tool call is valid. Codex reports the invalid call as a parse error but continues the loop and repeatedly executes the valid sibling command, causing repeated side effects.

What steps can reproduce the bug?

Standalone reproduction

Prerequisites: Docker, Python 3, and the GitHub CLI (gh) for the clone command below. The linked reproducer is self-contained and uses only Python standard-library modules plus Docker. It builds the affected CLI version from the public upstream package/release source and starts a local mock provider; it does not require this repository or any private fuzzing harness. The Docker run is limited to 2 CPUs and 4 GiB RAM by default.

Complete self-contained reproducer: https://gist.github.com/N0zoM1z0/922f2f7396789ccf18d0ae9fb2d6c689

The Gist contains codex-schema-invalid-parallel-tool-executes.reproduce.py. Download and run:

gh gist clone 922f2f7396789ccf18d0ae9fb2d6c689 codex-schema-invalid-parallel-tool-executes-reproducer
cd codex-schema-invalid-parallel-tool-executes-reproducer
python3 codex-schema-invalid-parallel-tool-executes.reproduce.py

To reuse an already-built local image:

python3 codex-schema-invalid-parallel-tool-executes.reproduce.py --skip-build

Key output from a local run against the affected version:

process_exit=-9
provider_requests=1087
tool_result_counts={'parallel_bad': 590241, 'parallel_ok': 590241}
late_stream_events_after_stop=0
side_effect_file_occurrences codex-schema-invalid-parallel-tool-executes.log 'codex-schema-invalid-parallel-tool-executes': observed=1126 expected>=2
REPRODUCED

What is the expected behavior?

Codex should reject the schema-invalid call without entering a loop that repeatedly executes valid sibling tool calls from the same malformed parallel response.

Additional information

No.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗