VS Code extension: sessions sidebar omits externally-created session transcripts (regression in 2.1.187–2.1.191)

Open 💬 3 comments Opened Jun 26, 2026 by bagelife2

Bug: VS Code extension 2.1.193 — sessions sidebar omits externally-created/modified session transcripts

Summary

After the Claude Code VS Code extension updated, the "Local" sessions sidebar
stopped listing session transcript files (~/.claude/projects/<project>/<uuid>.jsonl) that were
created or last modified by a process other than the extension itself (e.g. claude -p /
claude --resume headless runs from an external automation). Only sessions the extension itself
created or opened are shown.

Confirmed by bisecting via downgrade: 2.1.186 works, 2.1.191 AND 2.1.193 are broken.
So the regression was introduced somewhere in 2.1.187 – 2.1.191. Downgrading to
2.1.186 fully restores the list (all externally-written sessions reappear).

Environment

  • Extension: anthropic.claude-code — broken: 2.1.191, 2.1.193 / works: 2.1.186 (all win32-x64)
  • Regression range: 2.1.187–2.1.191
  • OS: Windows 11 (10.0.26200)
  • VS Code: stable
  • 2.1.193 auto-installed 2026-06-26 08:58 local; mirroring broke around that update.

Expected behavior (as in 2.1.191 and earlier)

The Local sidebar lists every session .jsonl present on disk for the current project,
minus hiddenSessionIds, regardless of which process wrote the file. This made the sidebar a
faithful mirror of the on-disk session set (used here to mirror against an external Telegram
remote-control daemon that drives claude headless).

Actual behavior (2.1.193)

Sessions whose .jsonl was created/last-written by an external claude CLI process do not
appear in the sidebar, even though:

  • the file exists in the correct project folder (C--Users-bagel),
  • the session is not in Anthropic.claude-code.hiddenSessionIds (verified via state.vscdb),
  • the session is not trashed,
  • the file is structurally identical to visible sessions (same first entry type

queue-operation, same keys operation/sessionId/timestamp/type, isSidechain:false,
gitBranch:HEAD, no summary),

  • Reloading the window and waiting do not surface them.

Sessions that were opened/created inside VS Code itself still show normally. Net effect: only
externally-driven (headless/automation) sessions are dropped.

Investigation notes (what was ruled out)

  • Not hiddenSessionIds (DB read live, missing sessions are show, not hidden).
  • Not trash, not the per-session file content/structure (byte-level fields identical).
  • No session-list cache found in globalStorage, workspaceStorage, or history.jsonl — the list

appears to be built at runtime by the extension host, and that logic now excludes
externally-written files.

  • agentSessions.model.cache in workspaceStorage holds only built-in VS Code chat sessions,

unrelated to the Claude sidebar.

Repro

  1. With the extension running, create/append a session transcript via an external process

(e.g. claude -p --session-id <uuid> "..." then claude --resume <uuid> ...), writing to
~/.claude/projects/<proj>/<uuid>.jsonl.

  1. Open the Local sessions sidebar in VS Code. Reload the window.
  2. The externally-written session does not appear (2.1.193). On 2.1.191 it appears.

Workaround

code --install-extension anthropic.claude-code@2.1.186 --force, disable extension auto-update
(extensions.autoUpdate: false), then fully quit and relaunch VS Code (a plain Reload Window
is not enough — the extension host keeps the old version cached).

Impact

Breaks any workflow that drives Claude sessions via the CLI/headless and relies on the VS Code
sidebar reflecting the true on-disk session set.

View original on GitHub ↗

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