Skip to content

v0.53.0 regression causes API Error 400 "Function call is missing a thought_signature in functionCall parts" #28604

Closed

Description

@donnyyu

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

Activity

  1. added
    status/need-triageIssues that need to be triaged by the triage automation.
    area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality
    on Jul 31, 2026
  2. added a commit that references this issue on Aug 1, 2026
    d280c42
  3. jhutar commented on Aug 4, 2026

    @jhutar

    Possibly duplicate of #28579

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualitystatus/need-triageIssues that need to be triaged by the triage automation.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions