Repository navigation
Description
Preflight Checklist
- I have searched existing requests and this feature hasn't been requested yet
- This is a single feature request (not multiple features)
Problem Statement
The VS Code Extension's "Past Conversations" panel has a hardcoded time limit (~30 days from creation date) that cannot be configured. Conversations older than this limit disappear from the UI even though:
- The JSONL files still exist and are intact in
~/.claude/projects/ - The conversations are fully accessible via
claude --resume <session-id>in terminal - Third-party extensions (like Claude Code Assist) can read and display these conversations
I'm aware that cleanupPeriodDays exists in ~/.claude/settings.json and controls file retention for the CLI. However, this setting has no effect on the VS Code Extension's "Past Conversations" filter. The extension should respect this setting or have its own equivalent.
Proposed Solution
Option A: Make the VS Code Extension respect cleanupPeriodDays from ~/.claude/settings.json
Option B: Add a dedicated extension setting:
"claudeCode.pastConversationsLimit": 90 // days, or 0 for unlimited
Option C: Allow resuming any conversation by session ID directly in the extension UI (similar to claude --resume <session-id>)
Alternative Solutions
Current workaround requires:
- Using third-party extensions (Claude Code Assist) to find the session ID
- Running
claude --resume <session-id>in terminal - Working in terminal instead of the VS Code Extension UI
This defeats the purpose of having a VS Code Extension.
Priority
Medium - Would be very helpful
Feature Category
Configuration and settings
Use Case Example
I'm working on a long-running documentation project. The conversation started on November 1st, 2025, and contains:
- 1072 messages
- 82 file changes
- Accumulated context about project structure, decisions made, and pending tasks
Step-by-step scenario
- November 3st: I start a conversation in VS Code Extension to work on documentation
- November month: I continue working, the conversation appears in "Past Conversations"
- December 4th (today): The conversation disappears from "Past Conversations" (older than ~30 days from original creation in early November context)
- I check
~/.claude/projects/- the JSONL file (9.4MB) is there. - I run
claude --resume <session-id>in terminal - it works. - But I cannot access it from the VS Code Extension UI anymore
Expected: If terminal can show and resume the conversation, the VS Code Extension should too.
Additional Context
- The third-party extension "Claude Code Assist" (agsoft.claude-history-viewer) can read and display all conversations from
~/.claude/projects/without any time limit, proving this is a UI filtering decision that helps me to find my conversation. - Related issues: [BUG] Claude Code's past conversation indexing is not working and may suffer from poor design #9898 (conversation indexing inconsistencies between interfaces), Disable auto-deletion of past conversations #4172 (conversation retention settings)
- The
cleanupPeriodDayssetting in~/.claude/settings.jsoncontrols file deletion but doesn't affect the VS Code Extension's UI filter.
Activity
github-actions commentedon Jan 7, 2026
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
ccalvop commentedon Jan 7, 2026
still occurring
ccalvop commentedon Feb 6, 2026
Update: Root cause identified:
sessions-index.jsonhas a hard capAfter more investigation, I found a mechanism causing limitation:
The
sessions-index.jsonfile caps at ~65 entries, while actual session files on disk are fully preserved.The VS Code "Past Conversations" dropdown reads exclusively from
~/.claude/projects/<project>/sessions-index.json, not from the actual.jsonlfiles. So even withcleanupPeriodDays: 999in~/.claude/settings.json(which correctly preserves all files on disk), the UI only shows what's indexed.Additional finding: CLI
/resumeis even worse:The terminal
claude --resumeonly displays ~10 recent conversations. So neither interface exposes the full history.Evidence:
sessions-index.json: 65 entries, oldest from Nov 19, 2025.jsonlfiles: 655 files, oldest from Nov 17, 2025This means the fix may need to address two things:
sessions-index.jsonshould index all sessions (or at least respectcleanupPeriodDays)/resumeneed pagination or real search to handle larger historiesThe current situation:
cleanupPeriodDayscontrols file retention but nothing controls index retention. The index appears to be rebuilt with a limited scope, making the retention setting only half-effective.Environment: Pop!_OS 22.04, VS Code Extension, Claude Code latest version.
ccalvop commentedon Feb 17, 2026
Deep dive: Source code analysis and empirical testing (CLI v2.1.44, VS Code Extension v2.1.44)
After inspecting the bundled source code (
cli.js, 11.5MB) and running practical tests, here are the concrete findings:1. CLI
/resumepicker is hardcoded to 10 sessionsIn the source code, the session listing function is called with a literal
10:This means even with hundreds of sessions on disk, the CLI interactive picker will never show more than 10.
2. VS Code dropdown has a fixed slot cap (not a time-based filter)
The VS Code "Past Conversations" dropdown reads from
sessions-index.jsonand displays a fixed number of sessions. Empirical evidence:sessions-index.jsoncontains 82 entriesCritical finding through testing: When I "refreshed" an old session by opening it via CLI (
claude --resume SESSION_ID), it appeared in the VS Code dropdown, but the previously oldest visible session disappeared. This confirms it's a fixed number of slots, not a time window. The dropdown behaves like a fixed-size queue: new/refreshed sessions push out the oldest ones.3.
cleanupPeriodDaysonly controls file deletionSetting
cleanupPeriodDays: 999preserves.jsonlfiles on disk indefinitely. However, nothing else in the system respects this value. The index cap and UI limits are completely independent.4.
/resume SESSION_IDdoes NOT work in VS CodeTesting revealed that typing
/resume SESSION_IDin the VS Code prompt box does not resume by ID. Instead:/resumeopens the dropdown picker (which has the same limited view)/resume SESSION_IDas a message just sends it as text inputThe only way to resume an arbitrary session is via CLI:
claude --resume <full-session-id>5. Workaround: CLI resume "refreshes" sessions into VS Code dropdown
Running
claude --resume SESSION_IDin terminal:This workaround lets you access any session, but requires knowing the session ID beforehand (by inspecting
~/.claude/projects/<project>/files manually).Numbers from my setup
.jsonlfiles on disk (non-empty)cleanupPeriodDays)sessions-index.json/resumeProposed improvements
10is unnecessarily restrictive. Even raising it to 50 would help, or making it a setting.cleanupPeriodDays- If a user setscleanupPeriodDays: 999, the index and UI should expose all preserved sessions, not just a subset./resume SESSION_IDin VS Code - Allow resuming by session ID directly in the VS Code prompt box, bypassing the dropdown entirely. The code already has the pattern (/resume ${q.sessionId}) but it doesn't work in practice.Environment: Pop!_OS 22.04, Claude Code CLI v2.1.44, VS Code Extension v2.1.44.
ccalvop commentedon Feb 17, 2026
Update: additional finding + workaround tool
New finding:
/compactdestroys conversation titlesThe index's
firstPromptfield gets overwritten after/compactwith a mid-conversation message instead of the user's original first message. VS Code's dropdown still reads the correct title from the.jsonlfile directly, but any tool relying on the index shows the wrong text.What I'd like to see improved (updated summary):
Remove or raise the session listing limits - The CLI's hardcoded
10and the dropdown's ~50 fixed slot cap should at minimum match all sessions withincleanupPeriodDays. If a user setscleanupPeriodDays: 999, the UI should expose all preserved sessions, not just a subset.Support
/resume SESSION_IDin VS Code - Currently it doesn't work. This would be the simplest fix - let users type a session ID directly in the prompt box.Preserve
firstPromptacross compaction - The original first message is valuable as a conversation title./compactshould not overwrite it.Workaround tool
In the meantime, I published a zero-dependency bash tool that works around these limitations: claude-sessions. It can search, browse, read, and resume any session stored on disk - including those not visible in the UI. The README also documents the full technical analysis of how session storage works internally.
github-actions commentedon Mar 17, 2026
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
github-actions commentedon Mar 26, 2026
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.