All projects
Dev toolslive

agenttrace

Observability for AI coding agents. Wires into the run loop to trace tool calls, timing, and failures so you can see what the agent actually did, not just its final answer.

TypeScriptNodeCLI
agenttrace replaying a recorded Claude Code session as a terminal timeline

the problem

When an AI coding agent does something wrong, the only evidence is usually its final answer -- there's no record of which files it touched, how long each step took, or where the run actually went off track.

approach

agenttrace wires directly into Claude Code's hook system (PreToolUse, PostToolUse, Stop), configured automatically the first time you run it. From then on, every tool call in the project is appended to a local JSONL file, one file per session -- timestamp, tool name, a truncated view of its input, file paths touched, and a rough token estimate. agenttrace replay turns that raw log back into a readable terminal timeline.

architecture

Hook-based capture

Configures Claude Code's own hook system in .claude/settings.json -- no manual instrumentation, no wrapper around the agent itself.

JSONL session log

One line per tool call, one file per session, kept local under .agentlog/ (auto-added to .gitignore). Nothing leaves the machine.

Terminal replay

Reconstructs a session as a timestamped timeline instead of a raw log dump, so a slow or failing tool call is easy to spot.