Whenever I am working on my repository and my agent (Grok 4.7 and any agents in general ) makes changes to many different files, the file change tracking menu above the chat box ( Example : > 10 Files Undo All Keep All [Review]) does not show all of the changed files making me rely on external source control software to see what my agent avoided telling me it changed.
This appeared a few months ago and is affecting all cursor versions I have ever used since then. I am currently on the latest update Version 3.27.12
Steps to Reproduce
Whenever i ask the agent to do something on my repository, some changed files are always missing from the file changes being tracked by the agent. I don’t know if it’s repo specific but this has been happening for months.
Expected Behavior
I must be able to see ALL of the changed files so i can review them and quickly reference them instead of manually scrolling and reviewing each step the agent took inside the chat.
The list above the chat box only shows changes that are still waiting for review in that chat, and a few kinds of agent edits don’t end up there:
Files the agent changes by running terminal commands or scripts (for example a Python script, sed, or moving and deleting files) aren’t tracked as pending changes at all.
Each file can only have one pending change, and it belongs to one chat. If several agent chats or builds work on the same project, or changes from an earlier chat were never kept or undone, a file another chat wrote later moves to that chat’s list and drops out of this one.
Occasionally an edit lands on disk without registering as a pending change.
Your screenshot looks like the second or third case: projectiles.json still shows its highlighted changes in the editor, but they aren’t attached to this chat’s list. The edits themselves are always written to disk, so nothing is lost.
What helps right now:
Click Review above the chat box and switch to the All Changes tab. It lists every file the agent edited with its file tools across the whole chat, not just the pending ones. (It isn’t available in chats that used subagents, and terminal-made changes still won’t appear there.)
Keep or Undo pending changes before starting the next build, and avoid running two builds on the same files at the same time.
Source Control remains the complete record, including terminal-made changes.
Next time it happens, could you check whether the missing file shows up under All Changes, and whether the agent changed it with a terminal command? That tells us which case you’re hitting.
I clicked on Review and this is a screenshot of the tab. It’s still missing the changes to that file. I didn’t use several agents at once but I have not kept some changes in the past ( i moved onto other agents without pressing Keep All) so this could also be the issue. Also it doesn’t seem that the agent changed the json file with a terminal command and as you can see in the screenshot projectiles.json was changed at the same time together with audio.json, enemy_skills.json and others, all of which appear properly on the change tracking.
Thanks though, I will probably never get rid of this bug since it’s incredibly time consuming to manually click on 100 older agents that did changes on that file and separately click “Keep All” on every single one of them.
The Keep line count can drift from what’s on disk when the agent writes to the same file several times in quick succession. The file itself stays correct. I didn’t find a change between 3.26 and 3.27 that would cause this, so the clean run on 3.26.16 may just be timing.
Could you repeat the parallel-edit test on the latest version, 3.28, and say whether the count always matches there? I’ve passed this to the team. In the meantime, it’s worth checking the file in Source Control before using Undo on something the agent edited in parallel.
@Evelinah, a correction to the earlier reply: the All Changes tab is hidden in chats where the agent ran subagents, which yours did, so it can’t show more than the list above the chat. For a file that’s still highlighted, open it and click Keep on the bar at the bottom of the editor. That works whichever chat the change belongs to.
Hi @hahaha1, thanks for running those. That lines up with what we’re seeing: the Keep counts only go wrong when several edits to the same file run in parallel.
If you have 3.22 or an earlier build around, does the same parallel-edit test give correct counts there?
3.22.12 doesn’t work. 3.21.18 works. This is the version I used before the upgrade. I rolled it back to 3.21.18, no issue on editing and keep counts any more.
From 3.22 on, agent edits reach the editor through a newer path. When several edits to the same file land close together, the change list can record them out of order, so the Keep counts drift even though the file on disk is right. I’ve passed your version results and this to the team.