[BUG] VSCode Extension: Undo restores code but does not revert conversation state or resume from that message

Resolved 💬 3 comments Opened Feb 28, 2026 by AayushMore1708 Closed Mar 3, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using the Undo feature in the VS Code extension of Claude Code, the editor correctly restores the previous code state, but the conversation timeline is NOT reverted.

Claude continues the session as if the undone messages and actions still exist in context.

As a result:

  • The file content is restored to a previous version
  • The conversation history remains at the latest point
  • Claude does NOT resume from the message where the undone change originated
  • Subsequent responses may reference code that no longer exists

This creates a mismatch between the code state and the conversational context.

What Should Happen?

Undo should revert BOTH:

  1. The workspace/code state
  2. The conversation state

Claude should resume from the exact message where the undone change was introduced, as if later messages never happened.

After undo:

  • Conversation history should rewind
  • Context should match the restored code
  • Claude should continue from that point

Error Messages/Logs

No explicit error message is shown.

The issue manifests as incorrect session state and context mismatch rather than a runtime error.

Steps to Reproduce

  1. Open VS Code with Claude Code extension installed
  2. Start a Claude session in a workspace
  3. Ask Claude to modify a file (e.g., refactor or add code)
  4. Accept the changes so the file is updated
  5. Continue the conversation with additional prompts
  6. Use Undo to revert the file changes by clicking the message whichever you want
  7. Observe that the file code changes returns to its previous state
  8. Ask Claude another question about the file

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

N/A

Claude Code Version

2.1.61

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

This behavior can lead to incorrect code suggestions, confusion, and potential errors because the assistant's internal context no longer matches the actual workspace state.

It would be helpful if Undo either:

  • Rewound the conversation automatically, OR
  • Displayed a warning about context mismatch, OR
  • Provided a dedicated "Revert session to this point" feature

Related observation:

Other features like conversation forking or session restore suggest that conversation state and workspace state are tracked separately.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗