[BUG] VS Code sidebar omits sessions created via SDK/headless (entrypoint: sdk-cli)
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
The VS Code extension's session history sidebar lists only sessions whose transcript records have entrypoint: "claude-vscode". Sessions created through the Agent SDK / headless CLI (entrypoint: "sdk-cli", promptSource: "sdk") are never listed, even though their .jsonl transcripts sit in the same ~/.claude/projects/<cwd>/ folder and are fully resumable via claude --resume.
Since entrypoint was the only variable that differed between A and B, it is conclusively the discriminator.
Impact
Sessions from automation / CI / SDK harnesses — and platforms that orchestrate Claude Code headlessly — cannot be browsed or resumed from the IDE sidebar, despite being intact on disk and resumable from the CLI.
What Should Happen?
Expected
Either list all entrypoints for the current project (consistent with the docs' statement that history shows sessions "regardless of which entrypoint created them"), or document that SDK/headless sessions are intentionally excluded and provide an opt-in to surface them.
Error Messages/Logs
Steps to Reproduce
Controlled repro
- Create a new session through 'claude -p'
- Take any SDK-created session (
entrypoint: sdk-cli) in the current workspace's project dir — it does not appear in the sidebar. - Clone it to a new UUID twice; rewrite the internal
sessionIdto match each new filename. In clone A leaveentrypoint: sdk-cli; in clone B setentrypoint: claude-vscode. Keep mtime, perms, and all other content identical. - Reload the window → only clone B (
claude-vscode) appears. Clone A stays hidden.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.196
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_