VS Code Extension Guide
Coding Agent Trajectory Viewer
Review coding-agent sessions inside VS Code, recover earlier prompts and context, inspect tool activity, and export unified trajectory data for debugging or research.
BrowseOpen Claude Code and Codex sessions by project or working directory.
InspectSee prompts, responses, tool calls, subagents, context, and token statistics.
CaptureFor Claude Code, record API requests and responses sent through Anthropic.
Why Use It
- Recover prompts and context that are hard to find in long multi-turn conversations.
- Inspect the exact sequence of user messages, assistant responses, tool calls, tool results, and subagent activity.
- Compare what is saved in the local trajectory with what was sent to the model API.
- Export unified session data for debugging, dataset preparation, or offline analysis.
What The Extension Shows
Session Browser
The sidebar groups sessions by project or working directory. Claude Code and Codex sessions are visually separated.
Conversation Timeline
Opening a session shows user prompts, assistant responses, tool calls, tool results, thinking blocks when available, and token statistics.
Tool And Subagent Activity
Tool calls appear in context with names, inputs, results, and errors. Nested agent or task calls are linked when possible.
Project Context
The viewer surfaces saved context and metadata from local session files and related project files when available.
Unified Export
The export command writes one JSON file containing the parsed session, linked captures, system prompt information, tool definitions, and related metadata.
Claude Code vs Codex
| Feature | Claude Code | Codex |
| Local session browsing | Yes | Yes |
| Conversation timeline | Yes | Yes |
| Tool call inspection | Yes | Yes |
| Project context display | Yes | Yes |
| Unified JSON export | Yes | Yes |
| API request/response capture | Yes, through the local Anthropic proxy | Not currently enabled |
Codex support focuses on local trajectory viewing. Claude Code has the additional API capture mode because the extension can route Claude Code traffic through a local Anthropic proxy using ANTHROPIC_BASE_URL.
Basic Workflow
- Install the extension in VS Code.
- Open the Trajectory Viewer activity bar view.
- Choose a Claude Code or Codex session from the sidebar.
- Review the timeline, tool calls, context, and statistics.
- Use Trajectory: Export Unified Session (JSON) when you want a portable analysis file.
Claude Code API Capture Workflow
- Run Trajectory: Start Capture Proxy from the command palette, or click the capture status bar item.
- Start Claude Code in a VS Code terminal after capture is enabled.
- The extension sets
ANTHROPIC_BASE_URL so Claude Code sends requests through the local proxy.
- The proxy forwards requests to
api.anthropic.com and records request/response data.
- Open a captured session and inspect the API Calls, System Prompt, and Tool Schemas tabs.
Captured data includes request parameters such as model, max_tokens, temperature, stream, thinking configuration, system prompt blocks, tool schemas, exact messages sent to the API, response headers, request id, HTTP status, total latency, time to first token, and streamed response events.
Data Locations
Claude Code API captures are stored under:
~/.claude/recorder/captures/
Unified exports are written under:
~/.claude/recorder/exports/
On VS Code Remote SSH, the extension runs on the remote machine. Remote sessions, captures, and exports are stored on the remote machine, separate from local data.
Troubleshooting
- If API calls are not captured, start the capture proxy before launching Claude Code in the terminal.
- If Claude Code was already running, restart that terminal so it receives the updated
ANTHROPIC_BASE_URL.
- If the proxy looks stale, run Trajectory: Reset Capture Proxy Env and then start capture again.
- If you use Remote SSH, check the remote VS Code window because captures are stored on the remote machine.
- If Codex sessions appear but API capture tabs are empty, that is expected in the current version; Codex local trajectory viewing still works.