Skip to content

Agent: Accepting changes from old session reverts files to earlier state, losing subsequent work #292211

@digitarald

Description

@digitarald

When working with sequential agent sessions:

  1. Started an initial editing thread/session for bootstrapping (3 editing rounds to reach MVP)
  2. Moved on to 3+ additional sessions to refine the scripts
  3. Returned to the first thread which still had non-accepted/pending changes
  4. Accepted those pending changes to clear diff highlights
  5. Result: ALL files reverted to the state from step 1, completely losing the MVP work from subsequent sessions

STR:

  1. In an empty workspace, ask the agent to "create a Hello World one-liner markdown file".
  2. Don't accept the changes, just go to a new session and say "change Hello World to Hello Harald".
  3. Accept the changes, go back to the first session and accept the changes there too.
  4. 🐛 "Hello Harald" is gone

Expected Behavior:
There should be versioning/dirty-tracking to prevent accepting stale changes that would overwrite newer work or mark the old session as applied since more changes got stacked on top of them.

Current Behavior:
No guard or warning exists. Accepting old pending changes silently overwrites all subsequent work, causing data loss.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugchat-agent-editing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions