Repository navigation
Closed
Labels
area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent QualityIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualitystatus/need-triageIssues that need to be triaged by the triage automation.Issues that need to be triaged by the triage automation.
Description
What happened?
✕ [API Error: {"error":{"message":"{\n \"error\": {\n \"code\": 400,\n \"message\": \"Function call is missing a thought_signature in functionCall parts. This is required for tools to work correctly, and missing thought_signature may lead to degraded model performance. Additional data, function call `default_api:activate_skill` , position 2. Please refer to [https://ai.google.dev/gemini-api/docs/thought-signatures](https://ai.google.dev/gemini-api/docs/thought-signatures) for more details.\",\n \"status\": \"INVALID_ARGUMENT\"\n }\n}\n","code":400,"status":""}}]
Root Cause Analysis & Comparison (v0.52.0...v0.53.0)
Comparing releases [v0.52.0...v0.53.0](https://github.com/google-gemini/gemini-cli/compare/v0.52.0...v0.53.0), this error was introduced in v0.53.0 by PR #28509:
PR #28509: fix(core): filter out thought parts from getHistoryTurns when context management is disabled
Why it worked in v0.52.0:
In v0.52.0, raw model message parts—including internal reasoning/thought objects and their attached thought_signature fields—were preserved in conversation history payloads sent back to the Gemini API during tool execution turns.
Why it breaks in v0.53.0:
PR #28509 introduced a filtering pass on getHistoryTurns that indiscriminately strips thought parts when context management is disabled. This inadvertently strips the required thought_signature associated with active functionCall turns (e.g., default_api:activate_skill), causing the Gemini backend API to reject subsequent turns with HTTP 400 INVALID_ARGUMENT.
### What did you expect to happen?
The CLI should preserve required thought_signature fields attached to functionCall turns in history objects sent to the API, even when general thought filtering/pruning is enabled.
### Client information
<details>
<summary>Client Information</summary>
Run `gemini` to enter the interactive CLI, then run the `/about` command.
```console
> /about
│ About Gemini CLI │
│ │
│ CLI Version 0.53.0 │
│ Git Commit decc0b46c │
│ Model Auto │
│ Sandbox no sandbox │
│ OS darwin │
│ Auth Method gemini-api-key │
│ IDE Client VS Code
Login information
No response
Anything else we need to know?
No response
Reacted by sudodbhan, Satoshi Nagayasu, Juan Lizana, Hercules Lin, Ben Hughes, Peter Ebden, federico-mete-peya and Charles GAYDON
Metadata
Metadata
Assignees
Labels
area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent QualityIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualitystatus/need-triageIssues that need to be triaged by the triage automation.Issues that need to be triaged by the triage automation.
Activity
fix(core): preserve functionCall thoughtSignature when stripping thou…
jhutar commentedon Aug 4, 2026
Possibly duplicate of #28579