Sessions with ide_opened_file as first message are unlisted in VSCode chat history

Resolved 💬 4 comments Opened Mar 5, 2026 by kevdale Closed Apr 3, 2026

Summary

Sessions whose first user message is an <ide_opened_file> event (automatically sent by VSCode when a file is open) are effectively invisible in the VSCode session dropdown. The dropdown appears to only display sessions with human-readable labels derived from the first user message.

Details

The session label in the agentSessions.model.cache (stored in VSCode's workspace state.vscdb) is set from the first user message. When that message is an IDE context event like:

<ide_opened_file>The user opened the file /Users/.../todo.md in the IDE.</ide_opened_file>

...the label becomes <ide_opened_file>The user opened the file /User..., which appears to be filtered out or otherwise hidden from the session picker dropdown.

In my case, 205 out of 231 cached sessions (89%) have <ide_opened_file> or <ide_selection> labels and are not visible in the dropdown. This includes sessions with extensive conversation history (1500+ lines, 3.4MB) that are impossible to find through the UI.

Steps to Reproduce

  1. Open a file in VSCode with Claude Code active
  2. Start a Claude Code session (the first message will be the ide_opened_file context event)
  3. Have a full conversation
  4. Close the session
  5. Try to find it in the session dropdown — it won't appear

Expected Behavior

Sessions should be labeled based on the first real user prompt (not IDE context events), or the label should be updated as the conversation progresses. Sessions should not be invisible in the history UI regardless of how they were initiated.

Environment

  • Claude Code v2.1.69
  • VSCode on macOS (darwin-arm64)
  • Session data is present in ~/.claude/projects/ JSONL files and in agentSessions.model.cache, just not shown in the UI

View original on GitHub ↗

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