Your agent ran 47 tools.
What actually happened?
Replay any Claude Code or Cursor session. Step through diffs, tool calls, and token costs. Runs locally.
$
npm i -g agent-replay
works with
Claude Code
Cursor
Opus 4.6
12m 34s
Tools 47
Input 98.2K
Output 44.1K
Cost $2.84
Edit
src/middleware/auth.ts
@@ -23,8 +23,14 @@
export async function authMiddleware(req: Request) {
const token = req.headers.get('authorization')?.split(' ')[1];
- if (!token) return unauthorized();
- const payload = jwt.verify(token);
+ if (!token) return unauthorized('Missing token');
+
+ const payload = jwt.verify(token, {
+ clockTolerance: 30,
+ ignoreExpiration: false,
+ });
+
+ if (payload.exp && Date.now() >= payload.exp * 1000) {
+ return unauthorized('Token expired');
+ }
req.user = payload;
return next();
A session, replayed
Timeline playback
Step through every event. Scrub at 1x–8x.
◀
▶
step
Space
play
1x
2x
4x
8x
Local only
Your data stays yours.
✓ localhost:3000
✓ reads ~/.claude/
✗ cloud
✗ account
✗ telemetry
Diffs, not JSON
Syntax highlighted. In context.
const token = getToken();
- if (!token) return;
+ if (!token) {
+ throw new AuthError();
+ }
Search & filter
Find anything. Jump to errors.
Read src/lib/auth.ts
Edit unauthorized('Missing token')
Bash npm run test:auth
Token costs
Per-model pricing. Know what each session costs.
Opus
$2.84
Sonnet
$0.62
Haiku
$0.08
Export
Share sessions. One click.
.md
Markdown
.json
JSON
Get started
1
$ npm i -g agent-replay
one-time setup
2
$ agent-replay
starts a local server
3
your browser opens with all your sessions
Supports
Claude Code
Cursor
Windsurf (soon)