agent-strace · git:20261109.326f50b · 2026-11-09 · sha256 1ac16f3962e126c0

agent-strace git:20261109.326f50bA

Immutable. This exact content never changes and is served at /api/v1/blob/1ac16f3962e126c0.

No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_ulf3ipuwy54xlkdr/1ac16f3962e126c083402dbdfc9fbce782cbccb4cf46abf006d11b9a235c0849.json

Then /plugin install agent-strace@markdownregistry-ulf3ipuwy54xlkdr in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.

---
name: agent-strace
description: Trace and investigate Claude Code or GitHub Copilot CLI sessions with agent-strace. Use when the user wants to capture an agent session, replay activity, explain a decision, diagnose repeated tool calls or failures, inspect cost, or audit a recorded session.
---

# agent-strace

Use the local `agent-strace` executable. The plugin contributes lifecycle hooks,
but the Python package must also be installed and available on `PATH`.

## Prerequisite check

Run `agent-strace --version`. If it is unavailable, stop and provide one of:

```bash
uv tool install agent-strace
pip install agent-strace
```

Do not silently substitute another tracing tool.

## Capture

Installed plugin hooks automatically record new Claude Code or Copilot CLI
sessions to `.agent-traces/`. Do not also install provider-specific manual
hooks with a different redaction mode because both handlers can run.

## Investigate

Choose the smallest command set that answers the request:

```bash
agent-strace list
agent-strace inspect <session-id>
agent-strace replay <session-id>
agent-strace explain <session-id>
agent-strace timeline <session-id>
agent-strace why <session-id> <event-number>
agent-strace lint <session-id>
agent-strace audit <session-id>
agent-strace cost <session-id>
agent-strace diff <session-a> <session-b>
agent-strace compare <session-a> <session-b>
```

Resolve an omitted session ID with `agent-strace list`. Prefer text output for
interactive analysis and JSON only when structured processing is necessary.
Report exact session IDs and event numbers for material findings.

## Safety

- Treat trace storage as read-only unless the user requests retention, import,
  anonymization, or another mutating operation.
- Preserve secret redaction.
- Do not claim causal intent from proximity alone; use `why` or clearly label the
  conclusion as an inference.