hoangsonww / hoangsonww/Claude-Code-Agent-Monitor

[Feature]: Side-by-Side Session Comparison (2 or more sessions)

Open
#292 0 comments 0 reactions 1 assignee Claimed by @hoangsonww View on GitHub
bug documentation enhancement good first issue help wanted question
Dominant language
TypeScript
Stars
1k
Forks
234
Avg merge
2d 9h
Merged PRs (30d)
18

Description

## Problem
There's no way to compare two+ sessions against each other. Users evaluating a prompt change, a model swap, or "did this task get slower/more expensive over time" have to eyeball two separate Session Detail pages and mentally diff them.

## Proposal
Add a **Compare** view that puts two (or more) sessions side by side across cost, tokens, duration, tool usage, and outcome.

## Scope
- Entry points: "Compare" action on a session row/card, and a multi-select mode in the Sessions table ("select 2+ → Compare")
- Comparison view: synchronized columns per session showing total cost, token breakdown (input/output/cache), duration, model(s) used, agent/subagent count, status, and tool-call frequency histogram
- Delta highlighting (e.g. "+18% cost", "-40s duration") when comparing exactly 2 sessions
- Support comparing sessions across different projects/`cwd`s, not just within one
- Shareable URL (`/compare?ids=a,b`) so a comparison can be bookmarked or pasted to a teammate

## Technical Notes
- Reuse existing per-session cost/token/event endpoints (`/api/pricing/cost/:id`, `/api/workflows/session/:id`) rather than a new aggregate endpoint — compose client-side
- Cap comparison set (e.g. 4 sessions) to keep the layout and request fan-out sane
- No new tables required; this is a read/compose feature over existing data

## Acceptance Criteria
- [ ] User can select 2+ sessions and view them side by side
- [ ] Delta/percentage differences shown for the 2-session case
- [ ] Comparison state is reflected in the URL and shareable
- [ ] Works across sessions from different projects and different providers (Claude/Codex)
- [ ] No regression to existing Sessions table selection/filter behavior

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.