gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Invalid value at 'contents[6].parts[0].thought_signature'

Open martingms opened this issue 3 weeks ago • 5 comments

What happened?

I keep getting errors like the following when using gemini-cli with gemini 3 / preview features on. It typically happens after a few requests, and after it's triggered once it happens to every request in the session after that. Changing back to preview features off / gemini-2.5-pro does not fix it, the only way to get gemini-cli working again is exiting and starting again, with preview features off.

✕ [API Error: {"error":{"message":"{\n  \"error\": {\n    \"code\": 400,\n    \"message\": \"Invalid value at 'contents[6].parts[0].thought_signature' (TYPE_BYTES), Base64
  decoding failed for
  \\\" <LOADS OF BASE64 HERE> \\\"\",\n    \"status\": \"INVALID_ARGUMENT\",\n    \"details\": [\n
  {\n        \"@type\": \"type.googleapis.com/google.rpc.BadRequest\",\n        \"fieldViolations\": [\n          {\n            \"field\":
  \"contents[6].parts[0].thought_signature\",\n            \"description\": \"Invalid value at 'contents[6].parts[0].thought_signature' (TYPE_BYTES), Base64 decoding failed
  for
  \\\" <LOADS OF BASE64 HERE> \\\"\"\n          }\n        ]\n      }\n    ]\n
  }\n}\n","code":400,"status":"Bad Request"}}]

What did you expect to happen?

I expect the request to work normally.

Client information

Client Information

Run gemini to enter the interactive CLI, then run the /about command.

> /about

│ About Gemini CLI                                                                                                                                                            │
│                                                                                                                                                                             │
│ CLI Version                                                 0.18.4                                                                                                          │
│ Git Commit                                                  2e8d7831c                                                                                                       │
│ Model                                                       auto                                                                                                            │
│ Sandbox                                                     no sandbox                                                                                                      │
│ OS                                                          linux                                                                                                           │
│ Auth Method                                                 gemini-api-key      

Login information

API key

Anything else we need to know?

No response

martingms avatar Dec 02 '25 14:12 martingms

Found possible duplicate issues:

  • #8003
  • #8011
  • #8004

If you believe this is not a duplicate, please remove the status/possible-duplicate label.

gemini-cli[bot] avatar Dec 02 '25 14:12 gemini-cli[bot]

It might be a duplicate, but this also looks a bit different from the linked errors in that in this case the string that it tries to decode looks to be itself a json message or something.

martingms avatar Dec 02 '25 14:12 martingms

Can confirm that this is still an issue on:

/about

│ About Gemini CLI                                                                                                                                                       │
│                                                                                                                                                                        │
│ CLI Version                                               0.19.1                                                                                                       │
│ Git Commit                                                6169ef04b                                                                                                    │
│ Model                                                     auto                                                                                                         │
│ Sandbox                                                   no sandbox                                                                                                   │
│ OS                                                        linux                                                                                                        │
│ Auth Method                                               gemini-api-key                                                                                               │
│                                                                                 

And that deleting my ~/.gemini directory does not help.

martingms avatar Dec 03 '25 09:12 martingms

@SandyTao520 , is this similar to what you commented on https://github.com/google-gemini/gemini-cli/issues/8004#issuecomment-3314359513 ?

silviojr avatar Dec 04 '25 01:12 silviojr

I don't think it can still cause this issue, but @martingms did you try uninstall and reinstall gemini cli entirely?

SandyTao520 avatar Dec 04 '25 23:12 SandyTao520

I am running gemini-cli with npx, but it seems deleting the entire ~/.npm folder did the trick!

martingms avatar Dec 08 '25 11:12 martingms