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

Errors about tokens but rejected to compress

Open javydreamercsw opened this issue 2 weeks ago • 2 comments

What happened?

A bit frustrating. Errors about tokens but rejected compress attempts.

 ✕ [API Error: [{
     "error": {
       "code": 400,
       "message": "The input token count (1058724) exceeds the maximum number of tokens allowed (1048576).",
       "errors": [
         {
           "message": "The input token count (1058724) exceeds the maximum number of tokens allowed (1048576).",
           "domain": "global",
           "reason": "badRequest"
         }
       ],
       "status": "INVALID_ARGUMENT"
     }
   }
   ]]
 
 
 > /compress
 
 ✦ Compression was not beneficial for this history size.
 
 > continue
 
 ✕ [API Error: [{
     "error": {
       "code": 400,
       "message": "The input token count (1058725) exceeds the maximum number of tokens allowed (1048576).",
       "errors": [
         {
           "message": "The input token count (1058725) exceeds the maximum number of tokens allowed (1048576).",
           "domain": "global",
           "reason": "badRequest"
         }
       ],
       "status": "INVALID_ARGUMENT"
     }
   }
   ]]

What did you expect to happen?

Either to see autocompress, or the command to be successful.

Client information

Client Information

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

> /about
0.19.4

Login information

Google account

Anything else we need to know?

No response

javydreamercsw avatar Dec 09 '25 03:12 javydreamercsw

Found possible duplicate issues:

  • #13005
  • #13006
  • #6678
  • #12098
  • #11248

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

gemini-cli[bot] avatar Dec 09 '25 03:12 gemini-cli[bot]

@javydreamercsw thanks for reporting this! Do you know/remember how much of the context window was used at the time that this happened?

silviojr avatar Dec 09 '25 20:12 silviojr