← davidfromkansas.com

Agent Trace

Watch what Claude Code and Codex are doing and thinking, live, in your browser. Every action and every step of reasoning they write down shows up as it happens.

A sample session. On your computer it shows your own sessions.

Install

The easiest way is to ask your agent to install it. Pick your agent, copy the prompt, and paste it in.

  1. Paste this into Claude Code:

    Install Agent Trace for me by running this in a terminal:
    
    curl -fsSL https://www.davidfromkansas.com/viz/install.sh | bash -s -- claude
    
    Then tell me in a sentence or two what it changed.
  2. Start a new Claude Code session. The viewer opens in your browser at http://127.0.0.1:4877 and fills in as Claude works.

Or run it yourself

curl -fsSL https://www.davidfromkansas.com/viz/install.sh | bash -s -- claude

Use both? Replace claude or codex with all. Needs Node.js 18 or newer, on macOS or Linux (on Windows, use WSL).

What it shows

AgentActionsThinking
Claude CodeEvery tool it uses, before and after, from its hooksClaude's thinking text, from its session log
CodexEvery command and edit, before and after, from its hooksReasoning summaries, from its session log

Both agents save summaries of their reasoning, not every internal step, so that is what you see. Each entry also has a “Raw data” view showing exactly what was received.

Privacy

What gets installed

Everyday commands

Open the viewernode ~/.agent-trace/agent-trace.js open
Check it is runningnode ~/.agent-trace/agent-trace.js status
Stop itnode ~/.agent-trace/agent-trace.js stop
Remove itnode ~/.agent-trace/agent-trace.js uninstall

It starts on its own when a session starts, and stops itself after two quiet hours.

Source

Four short files you can read before installing: server.js, hook.js, agent-trace.js, viewer.html, and the installer.