How to Search, View & Resume Claude Code Sessions
Anthropic's Claude Code CLI gives developers superpowers right inside their terminal. But as you navigate complex repositories, finding past prompt rationales, tool executions, and file diffs from previous sessions can be painful. Here is everything you need to inspect, search, and resume your Claude Code history across macOS, Linux, and Windows.
Want to inspect a transcript.jsonl session right now with zero uploads?
Open our free, client-side session viewer to filter prompts, view tool call diffs, and inspect token consumption in any browser.
Where Does Claude Code Store Transcripts?
Whenever you execute claude in a repository, Anthropic records a complete step-by-step transcript of user inputs, assistant thoughts, tool calls (bash, ripgrep, file edits), and token metrics locally on your filesystem:
macOS & Linux:
~/.claude/projects/<sanitized-project-path>/transcript.jsonl
Windows:
%USERPROFILE%\.claude\projects\<sanitized-project-path>\transcript.jsonl
For example, if your repository is at /Users/you/work/api-server, the transcript file is saved under:
~/.claude/projects/Users-you-work-api-server/transcript.jsonl
Built-in Terminal Commands: Resuming Past Work
Claude Code includes native terminal commands to resume recent conversations within your terminal:
💻 Native Claude Code CLI History and Resume Commands
| Command | Use |
|---|---|
claude --resume (or claude -r) |
Open the interactive session picker for the current workspace. |
claude --resume SESSION_ID |
Resume a specific past session directly by ID. |
claude --continue (or claude -c) |
Continue the most recent session in this directory without prompting. |
claude --print |
Print the last turn response to stdout for piping. |
Why Claude Code Conversation History Changes How You Work
Treating your Claude Code transcripts as a searchable repository memory—rather than a pile of ephemeral sessions—fundamentally transforms day-to-day engineering velocity:
🔄 Stop Re-Explaining Complex Modules
If you spent 15 turns giving Claude deep architectural context on your auth layer or SQLite schema, don't start from scratch. Resume that exact session to maintain full context instantly.
🎯 Keep Architectural Decisions Consistent
Technical decisions compound across PRs. Resuming the original session prevents the agent from contradicting patterns, conventions, or design choices established days earlier.
⚡ Slash Token Costs & Prompt Latency
Re-explaining code burns input tokens and model warmup time. Continuing a warm session maximizes prompt cache hit rates (cacheReadTokens), saving up to 90% on API costs and cutting response times.
🧘 Manage Multi-Repo Contexts Calmly
When you can search and resume any Claude conversation across multiple projects in one global hotkey panel, repository hopping stops incurring a massive cognitive context switch.
💡 Never Lose a Late-Night Fix
That brilliant regex or tricky concurrency workaround you found at midnight is indexed in your history. Search the tool output, resume the session, and reuse it effortlessly.
Limitations of the Native CLI Resume:
- Workspace Isolated:
claude -ronly lists sessions from your current active directory. If you ran a command across a different repo or branch earlier today, you cannot search across projects. - No Full-Text Search: You cannot quickly search for specific bash commands, code snippets, or error logs across past transcripts.
- Dense JSONL: Raw JSONL files are hard to parse in standard text editors due to nested JSON payloads and token objects.
How to Parse Claude Code History from Terminal
If you want to quickly grep for past user prompts in a project transcript without opening the file, use jq:
# Extract all user prompts in chronological order
jq -r 'select(.type=="USER_INPUT") | .content' ~/.claude/projects/YOUR_PROJECT/transcript.jsonl
# Find all bash commands run by Claude Code
jq -r 'select(.type=="PLANNER_RESPONSE") | .tool_calls[]? | select(.name=="run_command") | .args.CommandLine' ~/.claude/projects/YOUR_PROJECT/transcript.jsonl
Native Claude Code Resume vs. L2Cache History
While the native claude --resume CLI command is great for quick terminal rollbacks, L2Cache for Mac adds visual search, token analytics, and cross-project indexing:
Supercharge Your Mac Developer Workflow
L2Cache keeps an unlimited, private, instant-searchable history of your terminal commands, code, and AI prompts on macOS.
Download L2Cache on the Mac App StoremacOS 13 Ventura or later · One-time purchase · Lifetime updates
Frequently Asked Questions
Where is the Claude Code config located on Mac?
Global settings, custom tool permissions, and authentication for Claude Code are stored in ~/.claude/config.json and ~/.claude/settings.json.
Does the In-Browser Session Viewer upload my transcript?
No. The L2Cache Claude Session Viewer runs entirely client-side using JavaScript File API. Your data never touches any server.
Can I search OpenAI Codex transcripts too?
Yes! Read our companion guide on searching OpenAI Codex rollout history on macOS.