[BUG]
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?
Session history disappears (or throws error suggesting rm -rf on globalStorage) after closing and reopening VSCode
Description:
After closing and reopening VSCode, previously created Claude Code sessions no longer appear in the extension's session history. In some cases, instead of showing an empty history, the extension throws an error referencing the following command:
Error: Claude Code returned an error result: No conversation found with session ID: 99a4eb96-8003-4745-998a-20f7f689db1e
View output logs · Troubleshooting resources
Steps to reproduce:
Open VSCode with the Claude Code extension and start a new session.
Do some work in that session (send messages, etc.).
Close VSCode completely.
Reopen VSCode and try to return to that same session.
Expected behavior:
The session should reopen with its full history intact, exactly as it was before closing VSCode.
Actual behavior:
The session history is empty / the previous session is no longer listed, OR
The extension throws an error referencing rm -rf ~/Library/"Application Support"/Code/User/globalStorage/anthropic.claude-code (see exact text above).
Additional context:
I confirmed that the actual conversation transcripts are still intact under ~/.claude/projects/<project>/*.jsonl after this happens — the data itself is not lost. This suggests the issue is with the extension's session index/cache stored in globalStorage/anthropic.claude-code, which appears to become corrupted or cleared between VSCode restarts, causing the UI to lose track of existing sessions (or throw the error above as a suggested "fix").
What Should Happen?
I should have access to my previues sesions
Error Messages/Logs
2026-08-07 09:28:04.687 [info] From claude: 2026-08-07T15:28:04.687Z [DEBUG] Policy limits: Saved to /Users/jesusmiranda/.claude/policy-limits.json
2026-08-07 09:28:04.687 [info] From claude: 2026-08-07T15:28:04.687Z [DEBUG] Policy limits: Applied new restrictions successfully
2026-08-07 09:28:04.712 [info] From claude: 2026-08-07T15:28:04.712Z [DEBUG] Remote settings: Fetched successfully
2026-08-07 09:28:04.720 [info] From claude: 2026-08-07T15:28:04.720Z [DEBUG] Broken symlink or missing file encountered for settings.json at path: /Users/jesusmiranda/saftu-bis/.claude/settings.json
2026-08-07 09:28:04.723 [info] From claude: 2026-08-07T15:28:04.723Z [DEBUG] Broken symlink or missing file encountered for settings.json at path: /Library/Application Support/ClaudeCode/managed-settings.json
2026-08-07 09:28:04.723 [info] From claude: 2026-08-07T15:28:04.723Z [DEBUG] Cleared CA certificates cache
2026-08-07T15:28:04.723Z [DEBUG] Cleared mTLS configuration cache
2026-08-07T15:28:04.723Z [DEBUG] Cleared proxy agent cache
2026-08-07 09:28:04.723 [info] From claude: 2026-08-07T15:28:04.723Z [DEBUG] CA certs: stores=bundled,system, extraCertsPath=undefined
2026-08-07 09:28:04.723 [info] From claude: 2026-08-07T15:28:04.723Z [DEBUG] CA certs: Loaded 121 bundled root certificates
2026-08-07 09:28:04.723 [info] From claude: 2026-08-07T15:28:04.723Z [DEBUG] CA certs: Loaded 2 system CA certificates
2026-08-07T15:28:04.723Z [DEBUG] mTLS: Creating HTTPS agent with custom certificates
2026-08-07 09:28:04.724 [info] From claude: 2026-08-07T15:28:04.723Z [DEBUG] Remote settings: Applied for this non-interactive run; consent deferred — not persisting the disk cache as consented
2026-08-07 09:28:04.724 [info] From claude: 2026-08-07T15:28:04.724Z [DEBUG] Programmatic settings change notification for policySettings
2026-08-07 09:28:04.732 [info] From claude: 2026-08-07T15:28:04.732Z [DEBUG] Broken symlink or missing file encountered for settings.json at path: /Users/jesusmiranda/saftu-bis/.claude/settings.json
2026-08-07 09:28:04.735 [info] From claude: 2026-08-07T15:28:04.735Z [DEBUG] Broken symlink or missing file encountered for settings.json at path: /Library/Application Support/ClaudeCode/managed-settings.json
2026-08-07 09:28:04.735 [info] From claude: 2026-08-07T15:28:04.735Z [DEBUG] [Bootstrap] Fetch ok
2026-08-07 09:28:04.736 [info] From claude: 2026-08-07T15:28:04.736Z [DEBUG] [Bootstrap] Cache unchanged, skipping write
2026-08-07 09:28:04.792 [info] From claude: 2026-08-07T15:28:04.792Z [DEBUG] [claudeai-mcp] Fetched 10 servers
2026-08-07 09:28:04.860 [info] Closing Claude on channel: g240z5i6ot5
2026-08-07 09:28:04.860 [error] Error spawning Claude (on channel g240z5i6ot5): Error: Claude Code returned an error result: No conversation found with session ID: 99a4eb96-8003-4745-998a-20f7f689db1e
2026-08-07 09:28:32.421 [info] Received message from webview: {"type":"request","requestId":"fogkt7l6tgu","request":{"type":"open_output_panel"}}
2026-08-07 09:28:38.380 [info] From claude: 2026-08-07T15:28:38.380Z [DEBUG] Metrics export disabled by organization setting
Steps to Reproduce
Open VSCode with the Claude Code extension and start a new session.
Do some work in that session (send messages, etc.).
Close VSCode completely.
Reopen VSCode and try to return to that same session.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude Code extension version: 2.1.224 (darwin-arm64)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_