Shabash
Blog · Claude Code guides

Claude Code in VS Code: where your chat history goes and how to get it back

How the Claude Code VS Code extension stores, archives and resumes conversations, how that relates to the CLI's history, and what to do when sessions go missing.

By Robin Mehta · September 25, 2026

If you use Claude Code in VS Code, your conversations live in the extension's Session history, not in the terminal's session picker. Here's how it works and how to find something that seems to be gone.

Finding past conversations

Click the Session history button at the top of the Claude Code panel. You can:

Why sessions disappear

Automatic archiving. Since v2.1.265, the extension archives sessions that have been inactive for 14 days. They aren't deleted: open Session history and look under Archived. You can change the period with the claudeCode.archiveInactiveSessions setting (1, 2, 7 or 14 days, or 0 to turn it off). Unarchiving everything at once needs v2.1.277 or later.

The old "Delete session" button. Before v2.1.257, the action was called Delete session, but it only hid sessions, with no way to restore them. After upgrading, those sessions reappear under Archived.

The 30-day transcript cleanup. Separately from archiving, Claude Code deletes transcript files older than cleanupPeriodDays (30 by default). Once the file is gone, neither the extension nor the CLI can open it. More on that here.

Does VS Code share history with the CLI?

Partly, and Anthropic's own docs say it two ways. The VS Code page says the extension and CLI share the same conversation history. The sessions page says each surface keeps its own session history.

What happens in practice, as reported on GitHub in September 2026:

So if a session is missing from the extension, try the terminal:

claude --resume

Press Ctrl+A to search every project. The open issue tracking lost extension history is anthropics/claude-code#9258, with dozens of comments.

Keeping everything

Two settings keep history from vanishing: turn off auto-archiving with claudeCode.archiveInactiveSessions if you prefer one long list, and raise cleanupPeriodDays in ~/.claude/settings.json so the transcripts themselves last longer.

Shabash reads the same transcript files, from VS Code and the terminal alike, keeps a copy past the cleanup, and groups them into threads of work per project, so it doesn't matter which window a session started in.

Questions

Where is Claude Code chat history in VS Code?

Open the Session history button at the top of the Claude Code panel. You can search by keyword or browse by time, and hover a session to rename or archive it.

Why did my Claude Code sessions disappear in VS Code?

Most often they were archived automatically after 14 days of inactivity, which the extension has done since v2.1.265. Look under Archived in Session history, or change claudeCode.archiveInactiveSessions.

Does the VS Code extension share history with the Claude Code CLI?

Both write sessions to ~/.claude/projects, and claude --resume in a terminal can open sessions started in the extension. In practice the extension's own list doesn't show sessions started in a terminal. Anthropic's docs describe this in two different ways.

Can I get back sessions I deleted in VS Code?

Before v2.1.257 the action was called Delete session, but it only hid them. After upgrading, those sessions appear under Archived.