Skip to content

Function call is missing a thought_signature: Claude Code

Quick fix

Upgrade to the latest CC Switch 4.0 release and retry. If it persists, report the version, system, full reproduction steps, and logs.

Error output
API Error: 400 Function call is missing a thought_signature in functionCall parts.

When Claude Code or Claude Desktop performs multi-turn tool calls through the CC Switch Gemini Native proxy, Gemini requires replayed functionCall parts to include thought_signature. Source inspection in the report suggests that the Claude client session id may be unstable, preventing CC Switch from retrieving the signature from the shadow store keyed by provider_id and session_id. CC Switch then sends Gemini a functionCall without the signature. This root-cause analysis and its proposed fix have not been validated by Rust tests or a build.

The same discussion records a related variant: when thoughtSignature is used for the field written back, Gemini may return Unknown name "thoughtSignature". The maintainer did not confirm these source changes, but stated that 4.0 substantially refactored the relevant functionality and recommended upgrading and retrying. The available evidence therefore does not confirm that 4.0 fixes the issue.

  1. Update CC Switch to the latest 4.0 release, then rerun the task that triggers Bash, Glob, Read, or MCP tool calls.

  2. If the same error persists after upgrading, record the CC Switch version, operating system, complete reproduction steps, and relevant logs or screenshots, then reopen or file an issue.

  3. For source-level work, validate the proposed approach from the discussion: if the session lookup fails, recover thought_signature by provider and tool_call.id, and consistently use thought_signature for the field written back. This is currently only untested source analysis and is not a confirmed fix.

ToolClaude Code / Claude Desktop
Version受影响:3.16.2 - 3.16.3;4.0 是否修复未确认
PlatformsmacOS
Can this issue still be reproduced in v3.16.3?
Yes. issue #4245 reproduced it with v3.16.3 on macOS 26.4, and a similar error also occurred with v3.16.2 before the upgrade.
Where should the Gemini transform/shadow path be patched?
The unvalidated analysis in the discussion suggests that when the session-level shadow lookup fails, it should recover the signature using provider and the exact tool_call.id, and consistently use thought_signature for the field written back. This approach has not undergone Rust tests or a build.
Will upgrading to 4.0 definitely resolve it?
This cannot be confirmed. The maintainer only stated that 4.0 substantially refactored the relevant functionality and asked users to upgrade and retry. There is no conclusion confirming a fix or successful user validation.

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.