VSCode extension drops sessions with large early base64 images from session picker

Resolved 💬 5 comments Opened Apr 6, 2026 by Yoel-Klein Closed May 18, 2026

Bug Summary

Sessions that contain large base64-encoded images (screenshots) in early messages become completely invisible in both the VSCode extension session picker and the CLI /resume picker. There is no way to resume these sessions from the VSCode extension.

Root Cause

Both the CLI and VSCode extension read only the first 64KB and last 64KB of session .jsonl files to extract metadata (title, summary, first prompt). When a session's first user message contains a base64-encoded screenshot, that single JSON line can be 900KB+, pushing the ai-title entry (written after the first assistant response) far beyond the 64KB read window.

Concrete example from my session:

| Entry | Byte offset | In 64KB window? |
|-------|------------|-----------------|
| L0-L1: queue-operation headers | 0–278 | Yes |
| L2: first user message (896KB screenshot) | 278–917,788 | Only first 65KB captured |
| L7: ai-title | 925,468 | No — 14x beyond the 64KB window |

Code paths affected:

VSCode extension (extension.js):

  • mx6() reads first/last 64KB → qU6() extracts metadata → if (!W) return nullsession silently dropped from list
  • No fallback, no error logged, session completely invisible

CLI (cli.js):

  • lR7() reads first/last 64KB → kmY() extracts metadata → NmY() falls back to "(session)" label
  • Session may appear with generic "(session)" label but is easy to miss/not recognizable

What the user sees:

  1. Session worked fine during the conversation
  2. After closing, session disappears from both pickers
  3. VSCode extension: completely gone, no way to find it
  4. CLI: claude --resume <full-uuid> still works (bypasses the picker), but user must know the UUID

Bug 2: VSCode extension has no resume-by-ID

The CLI has claude --resume <session-id> as an escape hatch. The VSCode extension has no equivalent — the session picker is the only entry point. When a session is dropped from the picker (as described above), there is no way to resume it from within the extension.

Steps to Reproduce

  1. Start a new session in VSCode extension or CLI
  2. Send a message that includes a large screenshot/image as the first user message
  3. Have a conversation (so the session gets an ai-title)
  4. Close the session
  5. Open the session picker — the session is missing

Environment

  • Claude Code 2.1.92 (VSCode extension + CLI)
  • Windows 11
  • Session file: 14.1MB, 509 lines, 12 lines over 100KB (base64 screenshots)

Suggested Fixes

  1. Write ai-title before user content — if the title entry were written as one of the first few lines (before the user message), it would always be within the 64KB head window
  2. Scan further when head contains image data — if the 64KB head contains "type":"image", read additional chunks until ai-title is found
  3. Add resume-by-ID to VSCode extension — an input field or command palette entry (Claude: Resume Session by ID) as an escape hatch
  4. Store title in a sidecar index — write session titles to a separate lightweight index file that doesn't require parsing the full session

Workaround

Built an MCP server (session-manager) that scans up to 2MB per file using line-by-line streaming, correctly finding titles that the 64KB window misses. Available as a tool within conversations but still can't trigger a VSCode extension resume.

View original on GitHub ↗

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