Context Inclusion is Non-Deterministic

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I attached some files as context, but they clearly were not included in the context.

I tried this again with a new agent, same exact prompt, same model, etc. and they were included as context.

I know from the model response and also the token count in the two scenarios that the files were legitimately included as context in the first image, but not the second image.

Steps to Reproduce

Try attaching files as context and sending a prompt that specifically does not trigger the “read file” command. Then check if the files are in context. This will be your “default” state. Then repeatedly try the same initial prompt with new agents until the context inclusion state differs from the original.

Expected Behavior

I believe the files should deterministically be added as context. I read Summarization | Cursor Docs and it’s possible that this is not the case; it was not 100% clear to me from that file what the desired behavior is.

Screenshots / Screen Recordings

Operating System

Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.64 (Universal)
VSCode Version: 1.99.3
Commit: 25412918da7e74b2686b25d62da1f01cfcd27680
Date: 2025-11-06T04:35:14.424Z (1 day ago)
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.5.0

For AI issues: which model did you use?

Sonnet 4.5 (not thinking, not max)

For AI issues: add Request ID with privacy disabled

Request ID of initial prompt where context was properly included: 477fdad1-8f42-4c69-a3ab-3fd6b8452d35
Request ID of initial prompt where context was not properly included: 7257e00b-9cdc-4be0-b862-585dfd41cd2f

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report.

Cursor has a “smart condensation” feature that decides how to include files based on available context window space. It should be deterministic - identical inputs should produce roughly the same result each time. The fact that you’re seeing different behavior with the same setup needs investigation.

The provided Request IDs will help engineers trace what happened in both cases and understand why context inclusion behaves non‑deterministically.

I’ll pass this to the team. For now, starting a new agent when files aren’t being included should help you keep going.

A couple of quick questions:

  • Does this happen in new chats?
  • Are these large files or small ones?
  • How often does it happen, once or intermittently?

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