Share your agent sessions
Pick any Claude Code or Codex conversation, give it a URL, and share it with anyone.
curl -sSL https://install.replay.md | shHow it works
Install the CLI
One command. Works on macOS and Linux.
Upload a session
Replay detects your Claude Code and Codex sessions automatically.
Share the link
Public or private. Claim your username at replay.md/you.
Refactor auth middleware for session validation
nishant · @nishantjoshi
I'll refactor validateSession to use the new verifySessionToken helper. This extracts the bearer token, validates expiry, and optionally refreshes the session.
14 14export async function validateSession(15 15request: NextRequest16 16) {17 -const token = request.cookies.get("session");18 -if (!token) return null;19 -const session = await db.sessions.findUnique({20 -where: { token: token.value },21 -});22 -return session?.expiresAt > new Date() ? session : null;17+const token = extractBearerToken(request);18+if (!token) return { valid: false, reason: "missing" };19+20+const result = await verifySessionToken(token, {21+maxAge: SESSION_MAX_AGE,22+refresh: true,23+});24+25+return result;23 26}
I'll move the session configuration to src/lib/auth.config.ts and export the constants from there. This keeps the validation logic clean and makes the config easy to adjust per environment...
This is what sharing looks like.
Explore public threads →Built on trust
Your data, your control
Sessions are private until you choose to share them. Delete anytime.
Open source CLI
The replay CLI is open source. Inspect every byte before it leaves your machine.