Cursor agent chat history polluted by prior branches

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor chat history does not isolate to the actual current thread. Cursor chat history / turn history is polluted by context from the replaced or later turn from the branch that was reverted.

When the user supplies file links into a thread, then reverts to a prior turn and resubmits a different prompt, the agent receives portions of the thread that has been reverted/overwritten.

For example, the user is engaged in a multi-turn chat with an agent. The user provides the agent with a file to read.

The user then reverts to a prior turn, say for example the turn where the file was provided. The user overwrites the prompt with a new one that does not include the file, and resubmits.

The agent is still provided with the file or other context that the user deleted.

Reverting / branching a thread does not produce a clean turn history up to and including the new prompt, it includes at least some elements from the reverted / branched turns.

This means that the user must step prior to the pollution, or start a new thread, because a reversion / branch is not clean or exclusive of the turns prior to the reversion / branch.

My assumption is that this is a product of the chat system’s context management not correctly reverting to the exact location of the user’s reversion, but instead continuing to “summarize” the reverted thread branch.

Steps to Reproduce

Begin a chat. At any point, introduce context to the chat.

Revert back to any prompt.

Delete the context provided in the prompt at the point of reversion / branching, replace it with new context / prompt content.

Have the agent output the context from the turn.

The context will include at least some portions of the reverted / branched chat history.

Expected Behavior

The agent should only receive context from the prior turns and the current prompt.

The agent should never receive context from reverted / branched turns.

The agent’s turn history should only ever include the actual context the user has supplied in the active thread / branch.

Operating System

Windows 10/11

Version Information

Version: 3.4.20 (user setup)
VSCode Version: 1.105.1
Commit: 0cf8b06883f54e26bb4f0fb8647c9500ccb43310
Date: 2026-05-15T02:26:10.351Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.19044

For AI issues: which model did you use?

All models affected, this is a chat problem not a model problem.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @user174!

Thanks for the report. I spent some time trying to reproduce that this morning and wasn’t able to. Could you provide a Request ID from a chat where this happened?