Hey, this is an expected error, it just shows up in a messy way. Under the hood, Generate Commit Message sends the diff to the model with a 40K token limit, and if your staged changes don’t fit, the backend returns invalid_argument or “Request too long”. The client only shows [invalid_argument] Error, which doesn’t explain what went wrong. That’s on our side and we’ll fix it.
Workaround: commit in parts. Unstage some files, or unstage big hunks using Stage Selected Ranges, then generate a message for a smaller set and repeat. From your screenshot you have 5 files staged, try starting with 1 or 2. Most likely one change, maybe auth-splash.tsx or something else large, is blowing up the diff.
I’ll file a report about the bad error text so we can replace it with something like “changes too large, try staging fewer files”. If you still see this error with a small diff after reducing what’s staged, let me know and we’ll take a closer look.
Hey @Onkar_Singh1, thanks for the report. Interesting one. The case in the thread above is related to a big diff that doesn’t fit into the model’s token limit. If yours is failing on a single file with one change, that’s a different story and we should dig deeper.
Can you share:
Your Cursor version: Help > About or Cursor > About Cursor
The Request ID for the failed attempt: open the chat, click the menu in the top right > Copy Request ID
A full screenshot of the error, plus roughly what file and change it is (type, size)
With that, I can tell if it’s the same error path or something else.