# Cursor CLI does not close Gemini Thinking tokens

**URL:** <https://forum.cursor.com/t/cursor-cli-does-not-close-gemini-thinking-tokens/148497>\
**Category:** Bug Reports\
**Tags:** cli, gemini\
**Created:** [January 10, 2026, 2:56pm UTC](https://forum.cursor.com/t/cursor-cli-does-not-close-gemini-thinking-tokens/148497 "2026-01-10T14:56:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![someone\_else](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@someone\_else](https://forum.cursor.com/u/someone_else)\
**Post date:** [January 10, 2026, 2:56pm UTC](https://forum.cursor.com/t/cursor-cli-does-not-close-gemini-thinking-tokens/148497/1 "2026-01-10T14:56:53Z")

</div>

### 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

 ![Screenshot 2026-01-10 at 20.25.18.png](https://us1.discourse-cdn.com/cursor1/original/3X/3/1/31bb256f71ae8b65590b84ed341535bd8dcf816e.jpeg)

### 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

---

<div class="post-metadata">

**Author:** ![someone\_else](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@someone\_else](https://forum.cursor.com/u/someone_else)\
**Post date:** [January 10, 2026, 3:00pm UTC](https://forum.cursor.com/t/cursor-cli-does-not-close-gemini-thinking-tokens/148497/3 "2026-01-10T15:00:38Z")

</div>

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: `</\s`_`think\s>`_

---

<div class="post-metadata">

**Author:** ![Rao\_Athar](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@Rao\_Athar](https://forum.cursor.com/u/Rao_Athar)\
**Post date:** [January 10, 2026, 3:04pm UTC](https://forum.cursor.com/t/cursor-cli-does-not-close-gemini-thinking-tokens/148497/4 "2026-01-10T15:04:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [January 10, 2026, 3:32pm UTC](https://forum.cursor.com/t/cursor-cli-does-not-close-gemini-thinking-tokens/148497/6 "2026-01-10T15:32:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![someone\_else](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@someone\_else](https://forum.cursor.com/u/someone_else)\
**Post date:** [January 10, 2026, 7:26pm UTC](https://forum.cursor.com/t/cursor-cli-does-not-close-gemini-thinking-tokens/148497/7 "2026-01-10T19:26:32Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![someone\_else](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@someone\_else](https://forum.cursor.com/u/someone_else)\
**Post date:** [January 17, 2026, 1:21pm UTC](https://forum.cursor.com/t/cursor-cli-does-not-close-gemini-thinking-tokens/148497/8 "2026-01-17T13:21:11Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/cursor1/original/3X/0/0/000a8225375f47e450b8f0c0224d14d005118e2f.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [February 8, 2026, 1:21pm UTC](https://forum.cursor.com/t/cursor-cli-does-not-close-gemini-thinking-tokens/148497/9 "2026-02-08T13:21:27Z")

</div>

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.
