Cursor CLI does not close Gemini Thinking tokens

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

I can see the thinking tokens of Gemini models on the CLI. I think it’s because the closing tag is </ think> while the code looks for (?)

Steps to Reproduce

Prompt Gemini 3.0 Flash, well, anything. If you do it enough times, it should come up.

Expected Behavior

The thinking tokens will show up enclosed in a

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

cursor-agent -v
2026.01.09-231024f

For AI issues: which model did you use?

Gemini 3.0 Flash

Does this stop you from using Cursor

No - Cursor works, but with this issue

I got cut off at “while the code looks for …

I was meaning to say, maybe the code looks for without any whitespace. A regex that matches any whitespace in-between should do the trick, like: </\sthink\s>

Based on the information provided, it appears the bug is in the Cursor CLI application, specifically with the Gemini 3.0 Flash model.

I think this could be a coding issue, possibly due to the incorrect closing tag in the code for displaying thinking tokens. The correct syntax should be (?), but it seems to be closed with </ think> instead. This might cause the thinking tokens to be displayed incorrectly.

Hey, thanks for the report.

I can see the issue with how thinking tokens are displayed in the CLI. Your hypothesis about the space in the </ think> tag looks right, I’ve passed this to the team so they can fix the parsing.

Could you share the Request ID for this request? That’ll help the team find and fix the bug faster.

1 Like

I would but I prompted some more messages afterwards, not sure if I could go back and copy the older ID (happy to do it if possible). This is the chat ID if it helps:

7196f325-65e8-4ea9-b88a-beb9796f06db

1 Like

Hi again. I found this bug happening again with Claude 4.5 Sonnet. Rather interestingly, a non-thinking model is trying to output thinking tokens. I had set Claude 4.5 Sonnet here, non-thinking, and yet it still added tags. I copied the request ID if it’s helpful: b7b1d927-36c8-4bd4-8283-fc6b0d9a94d6