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.
- Conversation timeline - Review user prompts, assistant messages, tool calls, tool results, and thinking blocks when they are present in the saved trajectory.
- 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.
- Unified exports - Export a session plus linked captures as JSON for debugging, research, or offline analysis.
- 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: 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
| |