Conversation always insert git diff(like @branch) every message

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

In the chat panel of Cursor IDE, using the @Branch feature automatically inserts the diff between the current branch and the main branch.
However, when chatting normally with the model right now, this content gets incorrectly auto-inserted on every turn, causing context usage to increase dramatically—roughly 15k per turn, so a few turns can exhaust grok-4.6’s context window.
Based on my previous experience with Cursor, the content of Cursor’s first conversation turn is also abnormally large. I suspect that Cursor auto-injects the git diff main content on the first turn, and under the bug in the current version, all turns now auto-inject this content.
My suggested changes:

  1. Fix the bug.
  2. Expose this behavior of auto-injecting the diff and provide an optional toggle, since it may not always match the user’s expectations.

Steps to Reproduce

in chat pannel:
send first any message with/without @branch (15k tokens conversation)
send next any message with/without @branch (31k tokens conversation)

Operating System

Windows 10/11

Version Information

Version: 3.15.19 (user setup)
VS Code Extension API: 1.128.0
Commit: de07bee81cefe43461ebf4f40c3d2d78d15052a0
Date: 2026-08-11T05:22:54.627Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.291
OS: Windows_NT x64 10.0.26100

Does this stop you from using Cursor

Yes - Cursor is unusable

https://forum.cursor.com/t/critical-bug-git-diff-context-is-sent-repeatedly-with-every-message-wasting-10-15k-tokens-per-interaction/150387

same bug here

Hey, thanks for the detailed report and for the link to the similar thread, it’s the same issue and we’re tracking it.

Quick version: the @Branch flag can get stuck on the conversation context. When that happens, the diff between your branch and main gets re-injected on every turn, so the context grows fast. Expected behavior is that the diff is only attached to the message where @Branch is actually added, and it won’t be re-sent after that.

What you can do right now:

  • Start a new conversation, this resets the persistent context, including a stuck branch diff.
  • If you see the @Branch chip in the current conversation, remove it.
  • A large context size on the very first turn around 10 to 15k is normal, system prompt, rules, project structure. It’s not related to this issue.

To confirm this on your case, please share the Request ID of the turn where you think the diff got re-injected. You can find it via the top-right chat menu > Copy Request ID. Then we can check what was included in the context.

I can’t share a fix timeline yet, but I’ll post an update in the thread when we have one.

2c62c7ee-5c44-401f-8711-2519268757d8
c8ed6841-e608-49a4-abc5-17dad6734132
85c9cd72-09bd-479a-bb69-1e4f3c838a1c

Thanks, I grabbed all three Request IDs and passed them to the team so they can check what was in the context via our internal logs and confirm the diff was re-inserted on those exact turns.

While they’re looking into it, the most reliable workaround is to start a new conversation. That resets the persistent context, including the stuck branch diff. If you see the @Branch chip in the current chat, remove it.

We’re tracking this issue, but I can’t share an exact fix timeline yet. I’ll reply in the thread once I have an update.