Cursor composer and chat doesn't keep files in context

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:

Remember that the models will have access to your chat history, and hence will still be able to see the files you initially added to the context.

It’s usually only worth @ing the files directly again once the chat has gone on for some time without mention of the original files.

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)