Credentials. The supplied JSONL files may contain prompt and response content, so keep the output local unless you have reviewed it.
Who it is forA developer investigating a forked or resumed Claude session whose usage totals differ between two log files.
The problemTwo session files share response IDs, and the usage numbers for the same response do not match, so it is unclear which record to trust.
The outcomeA JSON file grouping the response IDs with repeated usage snapshots, conflicts and missing fields, read without rewriting any log.
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. - Locate the two Claude session files you want to compare, for example first-session.jsonl and fork-session.jsonl.
- Run
agentmeasure response-audit first-session.jsonl fork-session.jsonl --json responses.json. - Open responses.json and list each response ID with its conflicts and missing fields.
- Read the response-audit guide before drawing any conclusion about which snapshot is correct.
Prompt for your agent
Using the AgentMeasure repo, run `agentmeasure response-audit <first-file.jsonl> <second-file.jsonl> --json responses.json` and summarize the conflicts and missing fields per response ID. Verify that the output does not select a winning snapshot or compute a session total.
Caveat. The command groups and shows conflicts only, so you must decide which usage snapshot is right using your own evidence.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for roy-tong/AgentMeasure and "Compare Claude response usage across session files"
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