File change logic w/ Multiple Agents

How does Cursor treat the following scenario:

  • I tell Agent A to implement something. Agent A implements it.
  • I do not click “Keep all” yet - as I still haven’t decided.
  • I tell Agent B to implement something, which involves improving some of the code written by Agent A
  • I do not click “Keep all” yet for Agent B’s work.
  • I go back to Agent A and click Keep All for its original work.

Question: Does this revert the code to Agent A’s implementation, or does it keep Agent B’s changes to that code?

  • If I do Keep All for Agent B’s work and after that Keep All for Agent A’s work, does it retain the one that was implemented more recently?