Function call is missing a thought_signature - Claude Code
Quick fix
Triggering a tool call with Gemini Native in Claude Desktop proxy mode loses the thought_signature to a session ID mismatch. Await the official fix.
Symptom
Section titled “Symptom”API Error: 400 Function call is missing a thought_signature in functionCall parts.In cc-switch v3.16.0 through v3.16.3, calling a Gemini Native model through the proxy mode of Claude Desktop or the Claude App and triggering a tool call (default_api:Bash or an MCP tool) produces an HTTP 400. The root cause is that the Gemini shadow replay mechanism keys on (provider_id, session_id), but a Claude Desktop tool call request may not supply a stable client session id. cc-switch then records the assistant turn under one generated session key while the later tool result request uses a different key, so the stored thoughtSignature cannot be recovered and the upstream Gemini returns 400. This was marked in #4492 as a duplicate of #5415.
The problem is not fixed as of v3.16.3. Since this is a known cc-switch bug handling Gemini Native multi-turn tool calls, follow the main Issue #5415 for progress on a fix.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 2 real issues
- The v3.16.0 changelog says the thought_signature problem was fixed — why do I still hit it?
- v3.16.0 fixed some scenarios, but a tool call in Claude Desktop proxy mode (Bash, Glob, or an MCP tool) has an unstable session id and takes a code path that fix did not cover, so the problem remains.
Related problems
Section titled “Related problems”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.