When you need to understand why one Claude Code session burned through tokens while another sailed through efficiently, this pulls side-by-side comparisons from Agent Monitor data. You can compare specific session IDs, pit your best against worst performers, or benchmark one session against your rolling average. It breaks down token usage by type (input, output, cache reads and writes), shows cost differences with the pricing engine, maps out tool usage patterns, and traces where sessions diverged in their event timelines. The "Lessons Learned" section is the real payoff, translating raw metrics into actual takeaways about agent strategies and tool choice. Most useful during post-mortems or when you're trying to figure out why similar tasks sometimes cost 5x more than they should.

GitHub stars
455
last updated
Jun 11, 2026

Install

$ npx -y skills add hoangsonww/claude-code-agent-monitor --skill session-compare --agent claude-code

Installs into .claude/skills of the current project.

Files

Session Compare

Compare two Claude Code sessions side-by-side using Agent Monitor data.

Input

The user provides: $ARGUMENTS

This may be:

  • Two session IDs: "abc123 def456"
  • "best vs worst" — compare highest and lowest productivity sessions
  • "latest 2" — compare the two most recent sessions
  • A session ID + "vs average" — compare one session against the baseline

Procedure

  1. Identify sessions to compare:

    • If two IDs given: fetch both from http://localhost:4820/api/sessions/{id}
    • If "best vs worst": fetch sessions, score by completion + cost efficiency, pick extremes
    • If "latest 2": GET /api/sessions?limit=2 (default sort: most recently updated first)
    • If "vs average": fetch session + compute averages from last 50 sessions
  2. Gather detailed data for each session:

    • Session metadata: GET /api/sessions/{id}
    • Events: GET /api/events?session_id={id}
    • Agents: GET /api/agents?session_id={id}
    • Cost: GET /api/pricing/cost/{id}
  3. Build comparison:

Sponsors

Details

Repository
github.com/hoangsonww/claude-code-agent-monitor
Categories
DevOps & CI/CD, AI & Agent Building
License
MIT
First seen
Jun 11, 2026

More from hoangsonww/claude-code-agent-monitor

All 24
1hoangsonww avatarsession-debughoangsonww/claude-code-agent-monitor>0skills.sh installs
2hoangsonww avatarsession-reporthoangsonww/claude-code-agent-monitor>0skills.sh installs
3hoangsonww avatarship-featurehoangsonww/claude-code-agent-monitorImplement a feature safely end-to-end in this repository. Use when adding or changing functionality across backend, frontend, or MCP with required verification 0skills.sh installs
4hoangsonww avatarusage-trendshoangsonww/claude-code-agent-monitor>0skills.sh installs
5hoangsonww avatarweekly-reporthoangsonww/claude-code-agent-monitor>0skills.sh installs
6hoangsonww avatarworkflow-optimizerhoangsonww/claude-code-agent-monitor>0skills.sh installs