[BUG] VSCode sidebar "Past conversations" empty - extension filters out its own sessions via includeProgrammaticSessions=false (regression in 2.1.191)
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?
The "Past conversations" sidebar panel in the VSCode extension is empty - it shows no previous sessions despite having 87 session transcript .jsonl files on disk under ~/.claude/projects/.
Root cause: In v2.1.191, the VSCode extension host class (Ks) sets includeProgrammaticSessions = false, which filters out sessions with entrypoints in the set ["sdk-cli", "sdk-ts", "sdk-py"]. However, all sessions created from the VSCode extension itself are tagged with "entrypoint": "sdk-cli" in their transcript files. The extension is filtering out its own sessions.
The filtering logic in DAe() checks the head/tail of each .jsonl file for the entrypoint field, and when includeProgrammaticSessions is false, any session matching those entrypoints is excluded from the listing. Since the VSCode extension spawns Claude via the SDK (entrypoint: "sdk-cli"), every session it creates gets hidden.
Relevant code path in extension.js:
Ks(VSCode host class) overridesincludeProgrammaticSessions = !1listSessions()passesincludeProgrammatic: this.includeProgrammaticSessionsto the session listing functionKY()callsif (!t && DAe(r.head, r.tail)) return null- filtering out sdk-cli sessionsNAe = new Set(["sdk-cli", "sdk-ts", "sdk-py"])defines what counts as "programmatic"
What Should Happen?
Sessions created from the VSCode extension should appear in the "Past conversations" sidebar. The programmatic session filter should not apply to sessions that were created by the extension itself, or includeProgrammaticSessions should be true in the VSCode host class.
Error Messages/Logs
No error messages - the panel renders successfully but shows zero sessions.
Steps to Reproduce
- Install Claude Code VSCode extension v2.1.191 or later (tested on v2.1.193)
- Open a workspace and have one or more conversations via the sidebar
- Close the conversation and look at the "Past conversations" panel
- The panel is empty despite session
.jsonlfiles existing on disk
To verify:
- Check
~/.claude/projects/<project-dir>/-.jsonlfiles are present - Inspect the first user message in any
.jsonlfile - it contains"entrypoint":"sdk-cli" - In
extension.js, theKsclass setsincludeProgrammaticSessions=!1, which filters these out
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.190 - this version does not have the includeProgrammatic filtering concept at all. The filter was introduced in 2.1.191.
Claude Code Version
Extension: 2.1.193 CLI (via declawd): 2.1.157
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
The includeProgrammaticSessions property exists in two classes:
UU(base class): sets it totrue(correct for non-IDE contexts)Ks(VSCode extension host, extendsUU): overrides it tofalse
The intent appears to be hiding sessions created by external SDK consumers (scripts using Claude programmatically). But the VSCode extension itself uses the SDK transport and tags sessions as sdk-cli, so they get caught by the same filter.
Version comparison:
- v2.1.190: 0 occurrences of
includeProgrammaticin extension.js - v2.1.191: 5 occurrences, with
Ksclass setting it tofalse - v2.1.193: same behavior as 2.1.191
Possible fixes:
- Set
includeProgrammaticSessions = trueinKs(simplest) - Tag VSCode-originated sessions with a distinct entrypoint (e.g.
"claude-vscode") and only filtersdk-cliwhen used outside IDE context - Add a user-facing setting to control whether programmatic sessions are shown
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗