Skip to content
Edit this page

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

uv tool install agent-strace

No uv yet? See the uv install guide.

pipx install agent-strace
python -m pip install --user agent-strace

Check that it is on your PATH:

agent-strace --version

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.

agent-strace setup --cli copilot

This writes ~/.copilot/hooks/agent-strace.json. To use the Copilot CLI plugin instead:

copilot plugin marketplace add Siddhant-K-code/agent-trace
copilot plugin install agent-strace@agent-trace

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:

codex plugin marketplace add Siddhant-K-code/agent-trace
codex plugin add agent-strace@agent-trace

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.

agent-strace setup --cli gemini

Run this in your project:

agent-strace setup --cli cursor

Other agents, MCP clients and Python code: see Setup.

3. Record a session

  1. Restart the agent from a new terminal so it loads the hooks.
  2. 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:

agent-strace setup --cli claude --verify --live   # or --cli codex

Upgrade or remove

uv tool upgrade agent-strace
uv tool uninstall agent-strace
pipx upgrade agent-strace
pipx uninstall agent-strace

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