[BUG] Extension update discards the active session but keeps 17 stale ones
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?
Summary
Updating the Claude Code VSCode extension (anthropic.claude-code) to 2.1.206 terminated my in-progress session while preserving 17 older, inactive sessions. Session retention across an update favors stale sessions over the active one — the opposite of what you'd want.
So 17 idle sessions (some nearly a month old) survived the update while the single session I was actively working in was dropped. I had to manually persist state beforehand to avoid losing work.
Impact
Silent loss of in-progress work on update. Retention is evidently keyed on something other than recency/activity — a 28-day-old session outranked the one in active use. The manual-checkpoint workaround defeats the point of session persistence.
Environment
- Claude Code VSCode extension
anthropic.claude-code2.1.206 (updated ~10 min ago) - VSCode 1.128.0 (Universal), commit
fc3def6, Electron 42.5.0, Chromium 148, Node 24.17.0 - macOS (Darwin arm64 24.6.0)
What Should Happen?
Across an extension update, the active/in-progress session should be the most protected — restored first, and never dropped before older idle sessions. Retention should be keyed on recency and activity, so a session in active use is never discarded while month-old idle sessions are kept. If any pruning happens on update, the active session must survive it (or be restorable) without the user having to manually persist state beforehand.
Error Messages/Logs
Steps to Reproduce
Steps to reproduce
- Have one active/in-progress session open alongside a backlog of idle sessions.
- Let the VSCode extension update to 2.1.206.
- Reload / restart as prompted.
Expected
The active session is restored first — it should be the most protected across an update, never dropped before stale sessions.
Actual
The active session was gone after the update. Meanwhile the retained session list still held every stale session:
- 2 sessions ~28 days old
- 6 sessions ~16 days old
- 9 sessions 1h–4d old
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
2.1.186
Claude Code Version
2.1.206
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_