Skip to content

<tool_use_error>InputValidationError - Claude Code

Quick fix

An SSE parsing bug in the cc-switch conversion layer loses tool calls. Connect to the API directly, or switch to an official node, for now.

Error output
<tool_use_error>InputValidationError: Bash failed due to the following issue: The required parameter command is missing</tool_use_error>

When calling a third-party OpenAI-compatible API such as DeepSeek through the cc-switch proxy, the cc-switch conversion layer has a bug handling tool calls (tool call / function_call). Specifically, an SSE parsing anomaly swallows the tool call the model should emit, or loses its parameters (the command parameter, for instance).

Claude Code or Codex then receives a malformed tool response, triggering InputValidationError and interrupting the task. In some cases the interrupted stream wedges the cc-switch internal state, which keeps showing "login in use" and will not switch. Officially this was declared fixed in 3.19.2, but users report the problem persisting, and there is no clean fix yet.

  1. Bypass the cc-switch proxy and configure the third-party API baseurl and key directly in Claude Code or Codex.

  2. If you must use cc-switch, try switching to an API node that does not exhibit this SSE parsing problem, such as official GLM.

  3. If cc-switch is stuck showing "in use" and will not close, try force-killing the Codex process and clearing the persisted state under ~/.codex/. Users report this may not help, in which case bypassing the proxy or waiting for an official fix remains the answer.

ToolClaude Code / Codex
Version3.16.1 - 3.19.2
PlatformsLinuxWindowsmacOS
Is it fixed in 3.16.4 or 3.19.2?
Not entirely. 3.19.2 was declared to resolve it, but users report tool calls still being interrupted in practice.
Why does only the first file edit succeed while everything after fails?
Because the conversion layer loses function_call probabilistically during a continuing conversation, so later tool calls lack parameters and fail.
The CC Switch interface keeps showing login in use and will not close. What now?
The interrupted tool call wedged the CC Switch internal state. Try force-killing the background process or restarting the machine, though the root cause still needs the conversion layer bug fixed.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.