If you use CLI coding agents like Claude Code (claude) or OpenAI Codex (codex), you already know the superpower they give you: they write code, run shell commands, debug failing tests, and refactor multi-file architectures right inside your terminal.
But as you work on multiple branches, repositories, and projects throughout the day, a major friction point emerges:
"Where did that exact prompt, architectural explanation, or bash command go from 3 hours ago?"
Both Claude Code and Codex record transcripts locally on your machine:
-
Claude Code: Stored in
~/.claude/projects/<project>/transcript.jsonl -
OpenAI Codex: Stored in
~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl
💻 The Built-in CLI Options (And Where They Fall Short)
Both tools provide built-in terminal flags to resume past work:
1. Claude Code
-
Interactive Picker:
claude --resume(orclaude -r) lists recent sessions in your current directory. -
Direct Resume:
claude --resume <session-id>jumps directly into a specific conversation.
2. OpenAI Codex
-
Resume Command:
codex resume <session-id>orcodex --resumepicks up where you left off.
⚠️ Why the Default CLI Flags Fall Short:
While --resume is great if you just closed a terminal 5 minutes ago, it struggles as your history grows:
- No Full-Text Search Across Turns: You only get truncated single-line summaries. You cannot search: "Which session had that Docker compose volume fix?" or "What was the exact curl command we used yesterday?".
-
Siloed by Directory:
claude --resumeonly shows sessions for the current folder. If you worked across 6 microservices or multiple branches, finding a past solution meanscd-ing into every folder. -
Massive JSONL Files: Opening the raw 25MB
.jsonltranscript in VS Code or Vim will lag your editor and makes reading nested tool envelopes nearly impossible.
🛠️ The Solution: Claude & Codex Session Viewer (100% In-Browser & Local)
To solve this, we built a free, privacy-first web tool: Claude & Codex Session Viewer.
✨ What It Does:
-
📂 Single-Click Folder Linking: Use the native Web File System Access API to link your
~/.claudeor~/.codex/sessionsdirectory once. -
⚡ Real-time Smart Filtering: Filter instantly by agent (
Claude,Codex), Git branch, project name, or search query. - 🔍 Instant Full-Text Search: Query across all past human prompts, model responses, and executed tool calls.
-
💬 Clean Chat UI: Renders prompts, assistant replies, Markdown formatting, code syntax blocks, and tool executions (
Bash,file_edit,custom_tool_call). - 🛡️ 100% Private (Zero Cloud Uploads): All parsing and search indexing happens entirely on your machine via client-side JavaScript. No session files, API keys, or proprietary code ever leave your browser.
🔬 How the JSONL Parsing Works Under the Hood
Parsing session transcripts from multiple CLI agents requires dealing with diverse payload envelope architectures:
1. Claude Code Envelopes
Claude records user turns and assistant responses as discrete JSON objects:
{"type":"user","message":{"role":"user","content":"fix the memory leak in auth worker"},"sessionId":"019fef5f..."}
{"type":"assistant","message":{"role":"assistant","content":[{"type":"text","text":"I analyzed the heap snapshot..."},{"type":"tool_use","name":"Bash","input":{"command":"npm test"}}]},"sessionId":"019fef5f..."}
2. OpenAI Codex Rollout Envelopes
Codex wraps session lifecycles into a 2-pass envelope system with session_meta, turn_context, and event_msg:
{"type":"session_meta","payload":{"session_id":"019fef5f...","cwd":"/Users/dev/app","git":{"branch":"main"}}}
{"type":"event_msg","payload":{"type":"item_completed","item":{"type":"UserMessage","content":"review the auth PR"}}}
{"type":"event_msg","payload":{"type":"item_completed","item":{"type":"CommandExecution","command":"cargo test","exit_code":0}}}
Our parser runs a 2-pass indexing engine:
-
Pass 1: Pre-scans for session metadata, repository working directory (
cwd), Git branch, token usage, and tool error statuses. - Pass 2: Reconstructs the chronological conversation timeline, mapping tool calls and outputs to clean visual timeline cards.
🚀 How to Try It in 10 Seconds
You don't need to install anything or sign up for an account:
- Open the Claude & Codex Session Viewer in any modern browser (Chrome, Edge, Safari, Arc).
- Click "Link Claude Folder" and select
~/.claude(or drag and drop any.jsonlfile). - Search your past prompts, copy code snippets, or inspect exact tool outputs.
💡 Want Automated Background Tracking on Mac?
If you prefer not having to manually drag files and want instant ⌥ + Space search across all your clipboard history, screenshots (with on-device Apple Vision OCR), and AI coding sessions right from your macOS menu bar:
👉 Check out L2Cache for macOS ($4.99 Lifetime).
Happy coding! If you have suggestions or formats you'd like supported (like Gemini CLI or Cursor transcripts), leave a comment below!


Top comments (0)