Read a transcript missing from the session picker.
This procedure extracts text from a Claude Code transcript that still exists on disk. It does not restore deleted files or make a live session resumable. For live continuation, start with Claude Code’s own resume workflow.
1. Locate an existing transcript
For local CLI sessions, look under ~/.claude/projects/, or %USERPROFILE%\.claude\projects\ on Windows. If you set CLAUDE_CONFIG_DIR, use its projects directory instead. These locations are described in Anthropic’s application-data reference.
| File or path | What it contains |
|---|---|
<session>.jsonl | The conversation transcript. |
<session>.orphaned-*.jsonl<session>.jsonl.superseded-* | Previous transcripts Claude Code set aside. The official reference says these do not appear in the picker. |
~/.claude/history.jsonl | Prompt recall history. Use a conversation transcript for assistant answers. |
Keep the provider-owned files in place. Use a separate copy for experiments. If the transcript is absent, check an existing backup or another machine where that session ran. The steps below require an intact file.
2. Try a known example first
Download the synthetic Claude transcript into an empty working folder. It contains two readable messages about a refresh-token race and one synthetic metadata record. It contains no private conversation or live session.
With Node.js 20 or later and npm installed, run this from that folder. It installs the versioned v0.3.0 package from GitHub, then reads only the named input file.
npm exec --yes --package https://github.com/rogermas05/agent-recap/releases/download/v0.3.0/agent-recap-0.3.0.tgz -- agent-recap export ./orphaned-claude.jsonl --agent claude --out ./recovered.txt
Expected result:
Exported 2 messages to "./recovered.txt".
Skipped 0 malformed and 0 oversized records. 1 other records had no exported text.
Omitted 0 data/base64 string values before parsing. The 8 MiB record limit applies after omission.
Readable text only. This does not restore live session state or repair the provider resume index.
Open recovered.txt in a text editor. It includes the assistant’s shared-promise solution and an export summary. The JSONL source is unchanged. Running the same command again refuses to replace the existing output.
3. Read your file
Change ./orphaned-claude.jsonl to the exact path of your copied transcript, enclosed in quotes if it contains spaces. Choose an unused output filename. The exporter also accepts a filename with a .jsonl.superseded-… suffix, without renaming it.
For a small .jsonl file, you can also use the browser explorer to search and expand nearby messages. Selected files stay in the tab. It accepts up to 50 MB total and previews at most two messages on each side of a match. Use CLI export for larger files or full message text.
4. Check what was extracted
The exporter writes user and assistant text in file order, including machine context and sidechains. It omits tool calls/results, hidden reasoning and live runtime state. It does not reconstruct conversation branches, fix the provider index or import a task into another agent.
Before parsing, v0.3.0 discards string values under JSON keys named data or base64 at any depth. This keeps large embedded payloads out of memory while preserving the surrounding text fields. It still checks escapes in discarded strings. The remaining record must fit within 8 MiB or the whole record is skipped. Other large fields, including images stored under different names, still count toward that limit. The command and exported summary report malformed records, oversized remaining records, omitted payload strings and other records without readable text. Review these counts before relying on the extraction. Synthetic large-payload test and limits.
| Result | Next step |
|---|---|
Output already exists | Choose a new filename. Existing files and symlinks are refused. |
No readable messages found | Check that the file contains Claude user/assistant records. Prompt history, another format or fully skipped records will not produce an export. |
| Output publication fails | Use a local output directory that supports hard links. A handled failure leaves no published partial destination. Abrupt termination can leave a temporary staging file. |
POSIX output files are created with mode 0600. Windows ACL protection is not established by that mode. The exporter never changes the input file. Read the versioned implementation and synthetic large-file benchmark.