Get started¶
Record one coding agent session, then see what it did. This takes about five minutes.
You need Python 3.10 or later. agent-trace has no runtime dependencies, and traces stay on your machine in .agent-traces/.
1. Install the CLI¶
No uv yet? See the uv install guide.
Check that it is on your PATH:
Command not found?
Run uv tool update-shell (or pipx ensurepath), then open a new terminal. The agent's hooks call agent-strace from PATH, so this step matters.
The package and command are agent-strace
The project is agent-trace. The package on PyPI and the command you run are both agent-strace.
2. Connect your agent¶
Pick your agent. Each one gets hooks that record its session events.
This writes ~/.copilot/hooks/agent-strace.json. To use the Copilot CLI plugin instead:
Install the plugin:
claude plugin marketplace add Siddhant-K-code/agent-trace
claude plugin install agent-strace@agent-trace
Or run agent-strace setup and merge the hooks it prints into ~/.claude/settings.json. Use the plugin or the hooks, not both.
Install the plugin:
Or run agent-strace setup --cli codex. Use the plugin or the hooks, not both. Codex asks you to trust the new hooks in /hooks.
Other agents, MCP clients and Python code: see Setup.
3. Record a session¶
- Restart the agent from a new terminal so it loads the hooks.
- Create a branch and ask the agent for one small change.
4. See what happened¶
agent-strace replay # the latest session, in order
agent-strace health # what the capture recorded and what it missed
agent-strace review # findings for this branch
For Claude Code and Codex, you can also check that the hooks recorded matching events:
Upgrade or remove¶
Uninstalling leaves the agent's hooks in place. Remove the plugin, or the hooks file that setup wrote, as well.
Privacy¶
- Secret redaction is on by default.
- Traces are written only to
.agent-traces/in the session's working directory. - Anonymous product telemetry is on by default and never includes prompts, paths or trace contents. Turn it off with
agent-strace telemetry disable. See Telemetry.
Next steps¶
- Review an agent pull request in CI with the GitHub Action.
- Read the five findings that
reviewreports. - See what each agent captures and its known gaps.
- Browse every command.