All shelves / Mods / Usage
agent-trace
By krika2810
agent-trace is a Claude Code usage mod by krika2810.
Draws a pane beside the chat that lists every step after a prompt: each model request, tool call, and subagent, with time, tokens, context, and API-rate cost.
Draws
Install
The marketplace name is agent-trace.
claude plugin marketplace add krika2810/agent-trace claude plugin install agent-trace@agent-trace
It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.
- Version
- 0.1.0
- License
- MIT
- Repo stars
- 7
- Last change
- 2026-11-05
What it can reach
- Draws in the session
- Reads usage or context figures
- Sees tool calls
- Calls another program on this machine
Claude Code 2.1.275 or newer, Git so Claude Code can clone the marketplace, and Python 3 for the Today figure; the rest of the pane works without it. Start a new session or enter /reload-plugins; the pane opens on its own, or run /agent-trace, and /agent-trace clear resets it. Each session's trace is saved as one JSON file in ~/.claude/agent-trace/history/ and deleted after 30 days. Costs are API-rate estimates, not a bill. It works in the terminal, Claude Desktop's Code tab, and the VS Code extension. Inside a session the same two commands are /plugin marketplace add krika2810/agent-trace and /plugin install agent-trace@agent-trace.
The marketplace, agent-trace, holds only this plugin. Seeing what each prompt cost in time, tokens, and money is why this page files it under usage. session-meter draws a pane of context by category, the 5-hour and 7-day windows and their pace, and the last 30 tool calls and model requests. agent-profiler draws where a session's time goes, model wait against tools and subagents, in a status line and a live pane, and can write the session out as an OTLP trace. This one lists every step after a prompt as a card with its time, tokens, and cost, nests tool calls under the request that asked for them, and marks calls that ran in parallel. Its views are Inspect, Context, Agents, Story, Prompts, and Analytics, and the footer copies a run as CSV, Markdown, or JSON with credentials, emails, and home folders masked.
Demo

What it hooks into
session.startWhen a session startssession.endWhen a session endscommand.runWhen you run its slash command/agent-traceprompt.submitWhen you send a promptturn.startWhen Claude starts a turnprompt.composeWhile you write a promptturn.stepAt each step of a turnagent.spawnWhen a subagent startstool.checkA Claude Code eventclassic.PostToolUseA Claude Code eventclassic.PostToolUseFailureA Claude Code eventtool.callAround a tool call, where it can hold one
Read from the on() calls in its hook modules. Open its source under Files to check what each one does.
Slash commands 1
/agent-traceOpen the agent trace (/agent-trace clear resets it)
Files
The author's README and source, 4 files. They load when you open them.
Facts
- Author
- krika2810
- Category
- Usage
- Marketplace
- agent-trace
- Version
- 0.1.0
- License
- MIT
- Repo stars
- 7
- Last change
- 2026-11-05
- Language
- TypeScript
- Files
- 30