Coding Agent Trajectory Viewer
Ever wanted to recover a prompt that got pushed out of a long multi-turn conversation, or see exactly how Claude Code turns your request into the context it sends to Anthropic?
Coding Agent Trajectory Viewer is a VS Code extension for reviewing coding-agent interaction history directly inside VS Code. It lets you browse past sessions, inspect conversations between you and the agent, follow tool usage and subagent activity, view saved project context, and export recorded data for later analysis.
Read the full usage guide on Notion, or after installing run Trajectory: Open Usage Guide from the command palette (Ctrl+Shift+P / Cmd+Shift+P) to view the bundled markdown version. Run Trajectory: Open Printable Guide (PDF) to open the printable PDF handout in your system PDF viewer.
What You Can Inspect
- Past sessions - Browse Claude Code and Codex sessions from the VS Code sidebar, grouped by project or working directory. Renamed sessions (via
/rename) show their custom names.
- Conversation timeline - Review user prompts, assistant messages, tool calls, tool results, and thinking blocks when they are present in the saved trajectory. Intermediate steps are grouped into a collapsible "Agent process" section per turn, so final responses stay in focus; hidden thinking blocks are marked "NOT RELEASED BY ANTHROPIC" instead of appearing empty.
- Live sessions - The open session view refreshes automatically while Claude Code is running; no manual refresh needed. Your scroll position, active tab, and expanded turns are preserved across refreshes.
- Multi-day sessions - Sessions that span several days get day separators, a "jump to day" navigation bar, and idle-gap markers between turns.
- Subagent activity - Follow linked agent or task calls so nested work is easier to understand.
- Project context - View saved context files and session metadata that help explain what the agent saw.
- Memory - A dedicated Memory tab shows every memory source for the project: CLAUDE.md / AGENTS.md files (root and subfolders), Claude Code's auto-memory directory, shared note files in the workspace root, and global
~/.claude instructions, each with a preview and an "Open in editor" button.
- Cross-session search - Search any text (prompts, responses, tool output) across all recorded sessions and jump straight to the matching session.
- Usage dashboard - A calendar of your sessions per day (click a day, open a session), achievements, model response-time statistics (overall, per model, per effort level), true TTFT from captured calls, your own habits (time between turns, prompt lengths, prompts by hour, streaks), and a frequent-word cloud (your prompts, model responses, or both). Computed entirely from local files; no API calls, no cost. See docs/metrics-guide.md for exactly how every number is calculated.
- Unified exports - Export a session plus linked captures as JSON, or export a readable markdown transcript (prompts, process summaries, final responses) for sharing.
- Claude Code API captures - Capture request/response-level details, including system prompt blocks, tool schemas, request parameters, response headers, latency, time to first token, and streamed response events.
Claude Code And Codex Support
| Capability |
Claude Code |
Codex |
| Browse local sessions |
Yes |
Yes |
| View conversation timeline |
Yes |
Yes |
| Inspect tool calls and results |
Yes |
Yes |
| View saved context when available |
Yes |
Yes |
| Export unified session JSON |
Yes |
Yes |
| API request/response capture |
Yes, through the local Anthropic proxy |
Not currently enabled; local trajectory viewing still works |
The viewer features work for both Claude Code and Codex. The extra Claude-only feature is API capture: it records data that is not available from the saved local trajectory alone, such as max_tokens, temperature, thinking configuration, system prompt blocks, tool schemas, the exact messages sent to the API, response headers, HTTP status, total latency, time to first token, and streamed response events.
Quick Start
- Install the extension.
- Open the Trajectory Viewer activity bar view.
- Select a Claude Code or Codex session from the sidebar.
- Review the session timeline, tool activity, context, captures, and export options in the webview.
Claude Code API Capture
- Click the capture button in the status bar, or run Trajectory: Start Capture Proxy from the command palette.
- Start Claude Code in a VS Code terminal after capture is enabled.
- Claude Code sends API calls through
ANTHROPIC_BASE_URL, and the extension forwards them to api.anthropic.com while recording the request and response.
- Open a captured session to inspect the API Calls, System Prompt, and Tool Schemas tabs.
Captures are stored under ~/.claude/recorder/captures/, organized by project and session.
Cross-Window And Remote SSH
- Any VS Code window can start the proxy; other windows auto-discover it through
~/.claude/recorder/proxy.lock.
- If the proxy owner window closes, another window can take over automatically.
- On VS Code Remote SSH, the extension runs on the remote machine and stores captures there. Local and remote captures stay independent.
Commands
| Command |
Description |
| Trajectory: Start Capture Proxy |
Start the Claude Code API capture proxy |
| Trajectory: Stop Capture Proxy |
Stop capturing |
| Trajectory: Toggle Capture Proxy |
Toggle capture on or off |
| Trajectory: Copy Proxy Env Variable |
Copy ANTHROPIC_BASE_URL to clipboard |
| Trajectory: Reset Capture Proxy Env |
Clean up stale proxy environment |
| Trajectory: View Captured API Calls |
Open captured API calls in a panel |
| Trajectory: Export Unified Session (JSON) |
Export session plus linked captures as unified JSON |
| Trajectory: Search Across Sessions |
Search all recorded sessions for any text and open the match |
| Trajectory: Open Usage Dashboard |
Calendar of sessions, response-time and habit statistics, word cloud |
| Trajectory: Open Usage Guide |
Open the bundled markdown usage guide in VS Code's preview |
| Trajectory: Open Printable Guide (PDF) |
Open the bundled printable PDF guide in your system PDF viewer |
Requirements
- VS Code 1.85+
- Claude Code CLI for API capture
- Claude Code or Codex local session files for trajectory viewing
License
MIT
| |