VS Code extension crashes when switching branch while resuming /remote-control session
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 resuming a session from the VS Code extension after using /remote-control, a branch dialog appears: "Switch branch to main? This session was started on a different branch. Switch to continue with the original context." Choosing option 1, "Switch branch & continue", crashes the webview every time.
Choosing option 2, "Continue without switching branch", does not crash, but displays: "Couldn't load this conversation's earlier messages. New messages start a new conversation." The history is lost.
What Should Happen?
The branch should be checked out and the original conversation history should be restored, allowing the same session to continue from a different computer.
Error Messages/Logs
Something went wrong — Re-launch the extension to continue.
Error rendering content: Minified React error #185
(invariant=185, "Maximum update depth exceeded")
Steps to Reproduce
- Start a session in the VS Code extension on branch
main. - Run
/remote-controlon that session. - Reopen/resume the session remotely; the branch dialog appears.
- Choose "1 Switch branch & continue".
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.278 (win32-x64)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
- VS Code: 1.138.0
- OS: Windows 11
- The same sessions continue correctly from the mobile app.
- Goal: continue the same session from a different computer.