1. Home
  2. Claude features
  3. VS Code chat history

Save and reopen Claude Code chat history in VS Code

Find the right session, make a readable file when you need one, and preserve the code separately from the conversation.

To reopen a Claude Code conversation in VS Code, use Session history at the top of its panel. To save a readable conversation file, resume that session in the CLI and use the native export command. Keep a transcript and the changed source files separately: a conversation about a fix doesn’t preserve the repository that received it.

Find the conversation you meant to keep

The controls below follow Anthropic’s extension guide, as of November 2026. Open the relevant project folder first so the conversation and code belong to the same task.

  1. Click Session history.
  2. Search for a distinctive term from the task.
  3. Select the matching conversation.

Read its opening request and latest result before continuing. A title such as a login fix can describe several unrelated investigations, especially when you’ve tried different approaches. A meaningful title should distinguish the work well enough that tomorrow’s search doesn’t depend on remembering an exact sentence.

Rename the session to make that distinction clear. For a fictional accessibility investigation, a useful name could be:

Garden booking — keyboard focus after validation

That title says which screen and behavior you investigated. It doesn’t imply the defect was resolved, so you can keep using it while the implementation is still under review.

Look for an archived session

Expand Archived sessions, then choose Unarchive session. The extension guide explains automatic archiving settings; archiving and deleting transcript data are separate operations.

Treat the history list as a working index. If an important investigation belongs in a project record, save that record explicitly rather than relying on where the session currently appears. A search result is convenient access to work, but it doesn’t tell you which separate copies exist.

Save a readable conversation file

Anthropic’s VS Code guide states, “The extension and CLI share the same conversation history.” Terminal use requires the standalone CLI installation. Close the panel conversation before resuming it in a terminal in the project directory:

claude --resume

Select the conversation you checked in the panel. Anthropic’s session guide documents resuming saved sessions, and its command reference documents exporting the current conversation as plain text. After resuming the correct session, this command writes a named transcript:

/export garden-focus-review.txt

Open the resulting file in the editor. Check for the initial request, the relevant investigation, and the latest response; a file with the right name can still contain the wrong session. The Claude Code export guide covers the command’s file and clipboard options in more detail.

Keep the untouched transcript as the source record. If you need a shorter handoff, make a separate note rather than deleting the diagnostic trail from the only saved copy. Label an excerpt as an excerpt so a reviewer knows that earlier alternatives or failed attempts may be elsewhere.

Save one answer when that is enough

Use Copy response when only a particular explanation belongs in your notes. Paste it into a text document and save that document explicitly. Microsoft’s editing guide explains that an unsaved editor buffer and a file saved to disk are different states, even when VS Code can restore the buffer after a restart.

Choose the smallest record that still supports the reader’s task. A code reviewer may need the final rationale and its limitations, while a teammate continuing an investigation may need the sequence that led there. The copying guide covers preserving code blocks and checking long pasted output.

RecordUseful forWhat it leaves out
One copied answerA concise explanation or snippetOther turns and supporting execution details
Exported conversationReading the investigation laterA runnable copy of the repository
Saved session dataReturning through Claude CodeA replacement for your code backup
Reviewed code revisionThe implementation at a known stateReasons that exist only in the conversation

Keep history separate from project backups

Anthropic documents local transcript storage and cleanup rules. The default configuration root can be moved, and transcript files can contain private content from tools, including material those tools printed. Don’t put the entire personal Claude configuration directory into a shared repository just to save one useful discussion.

For repeatable work, keep a readable record, the relevant source revision, and the files needed to run it. Decide where each belongs under your team’s existing storage practices. The session-saving guide explains the distinction between a resumable session and a longer-lived backup.

Check whether the source revision actually contains the change discussed in the transcript. If the work is still uncommitted, record that fact and preserve the reviewed files through your normal backup process. An accurate revision label prevents someone from opening an earlier implementation and assuming that the conversation describes its behavior.

Also distinguish recorded history from active model context. Anthropic’s session documentation says that after compaction a resumed CLI session uses the summary, unsummarized messages, and later messages. Don’t assume every earlier detail is actively available merely because you can find it in a saved transcript.

DocMyChat doesn’t export the Claude Code panel in VS Code. Its browser extension works with supported claude.ai chats in desktop Chrome, so the native session and export routes are the relevant tools here.

Leave a clear place to resume

Return to the fictional focus-order investigation. Suppose the conversation ends after identifying a likely cause, but before checking the corrected form with a keyboard. A handoff that simply says the fix is done would collapse an observation and an unperformed check into a false conclusion.

Save a short original note beside the transcript. Use the actual repository revision and actual observations when applying this example to your own work:

Task: keyboard focus after validation on the booking form
Observed: record the behavior actually reproduced
Change: describe the reviewed source change, if any
Verified: list only checks that were completed
Still open: check focus after the error message appears
Source revision: record the revision under review
Conversation: garden-focus-review.txt
Next action: reproduce the remaining keyboard interaction

Reopen the saved transcript and the matching code revision before the next session. Start with the unfinished check in the note, then update the record with what you actually observe.

Questions

Where is Claude Code’s chat history in VS Code?

Open Session history in the Claude Code panel. Check Archived sessions for older work.

Is an archived conversation deleted?

Archiving moves the conversation out of the active list. It is separate from local transcript cleanup, so don’t treat an archive entry as a permanent backup.

Can I save just one answer from the panel?

Yes. Use Copy response, then paste into a text document. Save the document before treating it as a file you can hand off.

Does exporting the conversation back up my code?

No. The transcript records the discussion and rendered tool output. Preserve the relevant source files and revision separately so another person can review or run the actual implementation.