Credentials. Session logs can contain prompts, code and file content, so review the output before you share anything outside your machine.
Who it is forA developer or team lead who runs Codex or Claude Code daily and suspects that retries or duplicate records are inflating token usage.
The problemSession logs show more usage than expected, and it is unclear whether the extra counts come from duplicate records, retries or real work.
The outcomeA local report that flags duplicate records, retry amplification and token anomalies, with the note that missing evidence stays unknown and a retry is not automatically a second operation.
What you need first
- Python 3.9 or newer and pip
- A terminal on macOS, Linux or Windows
- A vendor billing export as CSV for the recount use case, or local Codex or Claude Code session logs for the log use cases
- Permission to read the session logs or export files you point the tool at
Steps
- Run
pip install agentmeasureto install the CLI. - Run
agentmeasure demoto see the output on a bundled synthetic session with no account and no upload. - Run
agentmeasure checkto inspect your default seven-day window of local sessions. - If the check finds no logs, run
agentmeasure check --allor pass an explicit--dirand--runtime. For Claude Code, runagentmeasure check --runtime claude. (inferred, check the README) - Review each flagged item and treat a missing input as a gap, not a pass.
Prompt for your agent
Using the AgentMeasure repo, run `agentmeasure check --runtime claude` on this machine and report duplicate records, retry amplification and token anomalies, with any missing inputs listed separately. Verify that the report states which inputs were not found instead of marking them as passing.
Caveat. With both runtimes present, auto-discovery prefers Codex, so pass `--runtime claude` explicitly when you mean Claude Code.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for roy-tong/AgentMeasure and "Check local Codex or Claude sessions for duplicate retries"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer