Unable to delete open sessions on VS Code

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 28, 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?

What's Wrong?

Sessions remain visible in the VS Code extension's sidebar session list even after all known backing data has been removed. Specifically:

  • Deleted the .jsonl session files from ~/.claude/projects/<project>/ (or the Windows equivalent) — sessions still appear in the sidebar.
  • Checked for sessions-index.json in the project folder — it does not exist.
  • Checked %appdata%\Code\User\globalStorage\ for an anthropic.claude-code folder (per the official docs' extension-reset instructions) — it does not exist either, so there's no per-extension file-based cache to clear.

This suggests the sidebar's session list is being sourced from somewhere other than the project directory, the index file, or a per-extension globalStorage folder — possibly state.vscdb's shared globalState table — but there's no documented way to inspect or reset that without risking unrelated extension data in the same shared SQLite file.

What Should Happen?

Either:

  1. The sidebar should reflect the actual state of ~/.claude/projects/ (rescan on load, no stale entries once source files are gone), or
  2. There should be a supported way to fully reset Claude Code's session cache — e.g. a claude code reset-sessions command, or a documented, extension-scoped storage location — without needing to hand-edit VS Code's shared state.vscdb.

Steps to Reproduce

  1. Accumulate multiple sessions in the VS Code extension's sidebar over time.
  2. Attempt to remove old sessions via the sidebar's hover delete/trash icon — sessions may reappear or fail to clear (see #49824, #67019, #75957).
  3. As a workaround, manually delete the .jsonl files in ~/.claude/projects/<project>/ — sessions still show in the sidebar.
  4. Look for sessions-index.json in the same folder — not present.
  5. Look for %appdata%\Code\User\globalStorage\anthropic.claude-code\ — not present.
  6. Sessions with no known backing file or index are still listed in the sidebar with no way to clear them via the UI or the filesystem.

Platform: Windows
Claude Code Version: [fill in — run claude --version or check the extension's version in the Extensions panel]
Related issues: This seems connected to #45424 (session vanishes from index despite intact .jsonl) and #75957 (delete is a UI-only hide, not a real deletion) — but neither matches exactly, since in this case there's no index file or globalStorage folder to point to as the source of truth at all.

Additional Information

Happy to provide diagnostic output (e.g. contents of state.vscdb extension keys) if a maintainer can point to what to look for.

What Should Happen?

What's Wrong?

Sessions remain visible in the VS Code extension's sidebar session list even after all known backing data has been removed. Specifically:

  • Deleted the .jsonl session files from ~/.claude/projects/<project>/ (or the Windows equivalent) — sessions still appear in the sidebar.
  • Checked for sessions-index.json in the project folder — it does not exist.
  • Checked %appdata%\Code\User\globalStorage\ for an anthropic.claude-code folder (per the official docs' extension-reset instructions) — it does not exist either, so there's no per-extension file-based cache to clear.

This suggests the sidebar's session list is being sourced from somewhere other than the project directory, the index file, or a per-extension globalStorage folder — possibly state.vscdb's shared globalState table — but there's no documented way to inspect or reset that without risking unrelated extension data in the same shared SQLite file.

What Should Happen?

Either:

  1. The sidebar should reflect the actual state of ~/.claude/projects/ (rescan on load, no stale entries once source files are gone), or
  2. There should be a supported way to fully reset Claude Code's session cache — e.g. a claude code reset-sessions command, or a documented, extension-scoped storage location — without needing to hand-edit VS Code's shared state.vscdb.

Steps to Reproduce

  1. Accumulate multiple sessions in the VS Code extension's sidebar over time.
  2. Attempt to remove old sessions via the sidebar's hover delete/trash icon — sessions may reappear or fail to clear (see #49824, #67019, #75957).
  3. As a workaround, manually delete the .jsonl files in ~/.claude/projects/<project>/ — sessions still show in the sidebar.
  4. Look for sessions-index.json in the same folder — not present.
  5. Look for %appdata%\Code\User\globalStorage\anthropic.claude-code\ — not present.
  6. Sessions with no known backing file or index are still listed in the sidebar with no way to clear them via the UI or the filesystem.

Platform: Windows
Claude Code Version: [fill in — run claude --version or check the extension's version in the Extensions panel]
Related issues: This seems connected to #45424 (session vanishes from index despite intact .jsonl) and #75957 (delete is a UI-only hide, not a real deletion) — but neither matches exactly, since in this case there's no index file or globalStorage folder to point to as the source of truth at all.

Additional Information

Happy to provide diagnostic output (e.g. contents of state.vscdb extension keys) if a maintainer can point to what to look for.

Error Messages/Logs

No error message

Steps to Reproduce

Every time VS Code is opened, and the Claude Code extension is selected, it creates a new session. The sessions are not deletable, and they continue to accumulate

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

1.40609.0

Claude Code Version

1.40609.0

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗