Simple tool to analyze your local Claude Code and Codex sessions
Project description
agentrecap
Generate a local, metadata-only HTML report from your Codex and Claude Code sessions.
uv run agentrecap
By default, agentrecap reads ~/.codex/sessions and ~/.claude/projects, then writes the report to ~/.agentrecap/reports/<timestamp>/index.html. When it finishes, it asks whether you want to open the report in your browser. Use --open to open it immediately without the prompt.
agentrecap \
--codex-input /path/to/codex/sessions \
--claude-input /path/to/claude/projects \
--output-dir /path/to/report \
--title "My agent usage report"
The report includes:
- Headline thread, run, event, duration, tool-call, and token metrics.
- Codex and Claude comparisons.
- Model usage, cache ratios, reasoning-token metrics, and estimated API costs.
- Tool usage and failure ratios.
- Run-duration, response-gap, thread-length, token, cache, and tool-call charts.
- CSV tables and metadata-only parquet data under the report's
data/directory.
The generated report does not include transcript contents. Thread, run, event, agent, and tool-call identifiers are hashed before they are written.
Cost estimates
During report generation, agentrecap downloads the current pricing catalog from models.dev and caches it under the report's data/ directory. If the refresh fails, it uses the cached catalog. If no catalog is available, the report still builds with costs marked unavailable.
Costs use standard API rates per million tokens for uncached input, cache reads, cache writes, output, and separately priced reasoning when available. They do not include subscriptions, discounts, batch pricing, or long-context tiers. Unknown model IDs remain unmatched instead of receiving a guessed price.
Metric notes
A run starts at a provider's model-run prompt and ends at its corresponding terminal event. Codex exposes explicit completion and abort events. Claude has no equivalent terminal event in these logs, so its end is inferred from the last assistant event before the next prompt. Incomplete runs remain visible.
Imported or resumed history can contain blocks of events with nearly identical timestamps. Runs with model or tool activity and a timestamp-derived duration of 100 ms or less are marked collapsed_timestamps and excluded from duration summaries.
Delegated and subagent prompts count as runs and are marked with is_sidechain. Tool-call counts include request-side events only. Codex token snapshots are converted from cumulative values into per-call increments, with repeated zero-delta snapshots discarded.
Reasoning tokens are a subset of output tokens. Separate reasoning counts are currently available for Codex but not Claude. End-to-end output tokens per second include reasoning, tool execution, and orchestration time; they are not a measure of raw model decode throughput.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentrecap-0.1.1.tar.gz.
File metadata
- Download URL: agentrecap-0.1.1.tar.gz
- Upload date:
- Size: 101.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82e28d8f5ce1924704f538ee49247cbfdd15f037f42e89322a34d21786057b33
|
|
| MD5 |
2e6cba0c60256d131d7791e729b2d642
|
|
| BLAKE2b-256 |
7b78f623a6dd3213f99bec63308a89006fbdf71f1c326665188fb4072c5f2cd5
|
File details
Details for the file agentrecap-0.1.1-py3-none-any.whl.
File metadata
- Download URL: agentrecap-0.1.1-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f26664d864435666fdd2e60d13f55f2db1666d9b68e60632427f2792364a71b8
|
|
| MD5 |
01016361cc32570c3938dc97a9f69342
|
|
| BLAKE2b-256 |
c98d1e9d57158ada70533c5b72dcbd0004ad75f88f396f12634d1d56fd8857ec
|