I’m confused about the context in Cursor because when I add 2 files to the context it’s there in the first message. But then it seems like any further messages only contain the current file as context.
I would prefer if the number of files in the context stayed the same with every chat or composer action.
Second message
As you can see, the second message only seems to keep the current file as context instead of all the files I added:
Ok, but I think the UI should show which files have been added to the chat context in every chat message. Otherwise I will have to scroll up to see which files were added to the chat.
GitHub Copilot seems to do something like this with their ‘Working Set’.
Agree 100% it’s super opaque and causes so many issues.
I can only assume it’s because Cursor (as a system) doesn’t actually know what files are being used as context or it’s too expensive for them to run that each time.
Thanks for bringing this up! Just to clarify - we do know exactly which files are passed to the model, but you’re right that it’s not always clear which specific parts the model actually uses vs ignores in its response
We’re actively working on making the context system more transparent. For now, you can see all files that are available as context via the pills above the input box (Cursor – Overview), and explicitly reference files using @ symbols if you want to make sure they’re considered (Cursor – @Files)
When I attach files for a question, ask, get a response, the context has been removed, according to the pills above the input window. I don’t know what is happening behind the scenes, but from the ensuing discussion, the model clearly no longer has that context in our back and forth, unless I manually re-attach each of them, every single iteration in the discussion. Which is ridiculous.
The context from your previous messages will still be kept here, but we don’t re-add the same file over and over as it’s usually just the same context, and it doesn’t make sense to repeatedly send the same file to the AI over and over.
Suppose you attach a file at any point in the chat. In that case, the only time you should need to re-attach it is if it’s been edited significantly manually (aka not by the Agent), and the AI should see the new version - any changes the Agent makes are tracked for you.
Then there must be some file summarization being done in the background to destroy the context, because if i don’t reattach files the agent will always say “i guess the code must write this way, but i can’t tell from the small snippet i have” and similar. If the agent can’t make modifications based on an understanding of the current i don’t see how it’s useful at all except for small edits. Big picture, nope.