Skip to content

InputValidationError: Write failed due to the following issue - Claude Code

Quick fix

When long tool arguments are truncated during streaming SSE, temporarily disable Tool Search, maximum-effort thinking, and the 1M declaration, then restart and…

Error output
InputValidationError: Write failed due to the following issue:
  The required parameter `file_path` is missing
  The required parameter `content` is missing

In the OpenAI Chat Completions streaming path, long `tool_calls[].function.arguments` may be silently discarded when SSE chunk parsing fails. The incomplete arguments are then converted into Anthropic `tool_use` content and passed to Claude Code, causing required fields to be missing. Issue #3497 reports that this occurs more often with longer content; it did not occur on the native Anthropic passthrough path. Disabling Tool Search, maximum-effort thinking, or the 1M declaration can only reduce the likelihood; it does not eliminate the problem.

Another report says that a Copilot Claude model call to Write had missing arguments and recovered after reverting the cc-switch version, but it did not confirm whether this shared the same root cause as streaming SSE truncation. Maintainers concluded that intermittent missing tool arguments in the VS Code extension were a client-side or provider-side issue that cc-switch cannot fundamentally fix.

  1. In cc-switch provider settings, disable “Enable Tool Search,” “maximum-effort thinking,” and “declare 1M support” in the model mapping. Fully quit and restart cc-switch and Claude Code, then retry; this can only reduce the likelihood of the issue.

  2. If supported upstream, switch to the native Anthropic passthrough path; Issue #3497 reports that this path did not exhibit the failure.

  3. If longer content still fails, retry manually; Issue #3497 reports that retrying usually recovers.

ToolClaude Code
Versioncc-switch 3.16.0(报告受影响);其他报告版本为 3.14.1、3.16.1、3.12.3,未确认受影响范围
PlatformsWindowsmacOS
Will disabling Tool Search, maximum-effort thinking, and the 1M declaration solve the problem completely?
No. Issue #3497 says these settings reduce the likelihood, but longer content may still fail.
Why does retrying sometimes work?
Issue #3497 reports that the failure is related to streaming SSE framing and timing; a new request may avoid the frame boundary that caused the arguments to be lost.
Can reverting to an older cc-switch version fix Write failures with Copilot Claude models?
Issue #2453 reports that Write calls on files of about 200 lines worked again after reverting from 3.14.1 to 3.13.0; the issue did not provide conclusions about a broader version range.

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.