Invalid value at 'contents[6].parts[0].thought_signature'
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
Found possible duplicate issues:
- #8003
- #8011
- #8004
If you believe this is not a duplicate, please remove the status/possible-duplicate label.
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.
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.
@SandyTao520 , is this similar to what you commented on https://github.com/google-gemini/gemini-cli/issues/8004#issuecomment-3314359513 ?
I don't think it can still cause this issue, but @martingms did you try uninstall and reinstall gemini cli entirely?
I am running gemini-cli with npx, but it seems deleting the entire ~/.npm folder did the trick!