agent-strace CLI
A CLI records coding agent sessions locally, replays what happened and shows what the trace could not prove.
- 104 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Hooks are written into agent settings and store prompts, commands and file operations in local files.
- The `share` packet can expose session data if it is not previewed first.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/agent-straceDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Hooks are written into agent settings and store prompts, commands and file operations in local files.
- The `share` packet can expose session data if it is not previewed first.
This is third-party code. Review the repository files before installing.
What it does
agent-strace saves a coding agent session as local files: prompts, tool calls, file operations, commands and failures. It then does three jobs. `replay` shows the session in order and `explain` summarizes it by phase. `health` rates the evidence `healthy`, `partial`, `unknown` or `invalid` and names observed gaps and known provider capture limits. `review` checks how reviewable a pull request is from its authoring session, and `share` writes a privacy-minimized HTML packet, with `share --dry-run` previewing what would be disclosed. Capture is switched on with `agent-strace setup --cli claude`, with variants for Codex, Gemini CLI, Cursor and Copilot CLI. It works with any MCP server through a proxy. Secret redaction is on by default, storage is NDJSON files and there are no runtime dependencies.
Who it is for. Developers and reviewers who need a verifiable record of what an agent did in a session before merging its changes.
Good fit when
- An agent changed a branch and the reviewer needs to see the order of calls and commands.
- You want to know which Claude Code skills were loaded and which never fired.
- A pull request needs a minimal evidence packet without private data.
- You doubt how complete a session record is and want to know what capture missed.
Not a fit when
- You need a production security boundary: the author warns the project is experimental.
- The agent works in a cloud with no access to local hooks: capture there is partial.
- You need every response recorded in full without redaction.
Example request
Show from the latest session which commands the agent ran and which files it edited, and check how ready the branch is for review.Limitations
The author marks the project experimental and asks not to treat it as a security boundary without your own threat model and tests. Capture depends on the agent: hooks only see calls the provider exposes and the Copilot cloud agent is captured partially. `health` names gaps but does not recover what is missing. Hooks are written into agent settings (`~/.claude/settings.json`, `~/.codex/hooks.json` and others), so the Copilot CLI plugin must not be combined with `agent-strace setup --cli copilot` or hooks duplicate. Python 3.10 or newer is required.
How to disable. Disable the plugin with `claude plugin uninstall agent-strace@agent-trace` or remove the hooks from agent settings. Uninstall the package with `uv tool uninstall agent-strace`; traces are plain files deleted separately.
FAQ
How do I enable capture in Claude Code?
Run `agent-strace setup`: it adds hooks to `~/.claude/settings.json`. The other way is the plugin: `claude plugin marketplace add Siddhant-K-code/agent-trace`, then `claude plugin install agent-strace@agent-trace`.
Can I try it without setup?
Yes, `uvx agent-strace skills --from-claude` reads Claude Code transcripts from `~/.claude/projects` and shows which skills were available, loaded and followed. No persistent store is created.
What does the health rating mean?
It is the completeness of evidence: `healthy`, `partial`, `unknown` or `invalid`. Observed gaps are listed with the rating.
Which agents are supported?
Claude Code, Codex, Copilot CLI, Gemini CLI and Cursor, plus any MCP server through a proxy. The Copilot cloud agent is captured partially.
Does `share` expose private data?
The packet minimizes them and secrets are redacted by default. `share --dry-run` shows in advance what would go into the file.
Discussion
No questions or reviews yet.
Related
CLI toolsagentplay turns local Claude Code, Codex and Cursor sessions into a file map and a replayable step timeline.
Reads local logs of Claude Code, Codex, Cursor and other agents and shows token spend, time and failures in a TUI
Session monitor for Claude Code, Cursor, Codex and six more agents in a terminal, window or HTTP API, with chat cleanup and search
A Python terminal coding agent in the manner of Claude Code: reads the repository, edits files, runs commands, with memory, sub-agents and MCP
One desktop window for Claude Code, Codex, Gemini CLI and OpenCode: terminals, pull requests, diffs and approvals
A CLI that records coding-agent steps and links file lines to the tool call, conversation and original request behind them.
README in short
The README describes three jobs, a quick start, capture through hooks and plugins for Claude Code and Copilot CLI, a GitHub Action and VS Code extensions. Details live in `docs/`.