aq.dev / guides / reviewing-claude-code-sessions

How to review Claude Code sessions

Reviewing a Claude Code session means reading the record of the run that produced the code, not just the diff it left behind. Claude Code gives you most of what that takes, as of August 2026: every session is saved continuously as a local transcript, resumable with claude --continue or claude --resume, exportable to readable text with /export, and even findable from the pull request it created. What it does not give you is a second reviewer: transcripts live in the operator's home directory on the operator's machine, and they are deleted after 30 days by default. This guide covers what Claude Code preserves, how a reviewer gets at it, and the workarounds that close the gap.

Why the session, not just the diff

The decisions that determine an agent PR's quality (how the task was briefed, where the agent was corrected, what warnings the operator waved past) happen during the run, and the diff records only their outcome. That is the premise of session review, and the gap is measured: a July 2026 LeadDev analysis of 25,264 agent-generated pull requests across 2,361 popular GitHub repositories found that in 79 percent of agentic PRs the same developer both reviewed and modified the agent's contribution, and only about one in eight workflows involved multiple humans. The full argument is in the self-review problem; the general method is in how to review an AI coding session. This page is about what Claude Code specifically hands a reviewer.

What Claude Code preserves, as of August 2026

Claude Code saves every interactive session continuously, without being asked. The record is a JSONL transcript under the projects folder of its config directory (by default a path like ~/.claude/projects/, one file per session), and it includes the full conversation: your prompts, the model's replies, and every tool call with its result. Three properties matter for review:

One caution: the JSONL entry format is internal and changes between releases, so the docs steer scripts away from parsing the files directly. For anything durable, use the export and scripting interfaces below.

The reviewer's toolkit

Four built-in mechanisms turn a stored session into something a reviewer can actually read.

1. /export renders the transcript. Inside a session, /export opens a menu to copy the conversation to the clipboard or save it as a plain-text file, with messages and tool outputs rendered as readable text. Pass a filename to skip the menu. This is the canonical way to produce a review artifact:

# inside the session, write a readable transcript to a file
/export review-fix-auth.txt

2. The session picker finds the run behind a PR. In the claude --resume picker you can press Space to preview a session's content without opening it, and the search accepts a pasted pull request URL to find the session that created that PR. There is also a direct flag:

# open the picker filtered to sessions linked to PR 142
claude --from-pr 142

For a reviewer at the operator's machine (or pairing over a screen share), this answers the first question of any session review, "which run produced this change", in seconds.

3. Headless mode interrogates a finished session. You can send a follow-up prompt to a stored session and capture the answer as JSON, which makes targeted review questions cheap:

claude -p --resume SESSION_ID --output-format json   "List every place I corrected you mid-run, verbatim" | jq -r '.result'

4. tmux holds the raw scrollback. If the session ran inside tmux (a good idea anyway, since tmux keeps it alive across disconnects), the terminal history is exportable independently of Claude Code:

tmux capture-pane -p -S - > raw-session-scrollback.txt

The transcript and the scrollback overlap but are not identical: the transcript is the conversation as Claude Code recorded it, the scrollback is what the operator actually saw, including anything that happened outside the agent.

What survives the end of a session

ArtifactSurvives session end?Until
Transcript (JSONL)Yes, automatically30 days by default (cleanupPeriodDays)
Checkpoints for /rewindYes, with the sessionDeleted with the transcript
/export fileYes, it is a plain file you ownWhenever you delete it
tmux scrollbackOnly while the tmux server runsReboot or session kill
Plain terminal scrollbackNoThe window closes

The gap: none of this reaches a second reviewer

Everything above is operator-side. The transcript sits in the operator's home directory on the operator's machine; the resume picker, the PR lookup, and /rewind all run there too. As of August 2026, Claude Code has no mechanism for a teammate to open a local CLI session:

So a second reviewer sees whatever the operator remembered to export, and nothing else. That is the self-review problem restated as a tooling default.

Workarounds that close the gap

Where AQ fits

AQ is the multiplayer coding harness where engineering teams run AI coding agents like Claude Code and Codex together: shared live terminals, a code editor, and app previews, in your own cloud. It is, in effect, the shared-tmux-box workaround turned into a product. Claude Code runs as the real CLI in a persistent tmux session on your team's VM, streamed live to the browser, so the session survives a closed laptop and resumes from any device. The part Claude Code cannot do on its own is the part AQ exists for: a teammate opens the same workspace and watches the same live session, scrollback included, with no export step and no access to the operator's machine. Workspace visibility stays owner-managed (team-visible, or private and shared with specific people), and each engineer signs into Claude Code with their own account, so there is no shared vendor key and AQ never marks up model usage.

The rest of the review happens in the same place: the reviewer reads the diff in the workspace editor, clicks through the live dev-server preview, and can pin comments on the preview that are sent to the agent as prompts. The PRs the agent opens are tracked on the workspace that produced them, so the session, the diff, and the result stay one link apart.

Start with what Claude Code already gives you: /export on every agent PR, a SessionEnd archive hook, and a longer cleanup period cost nothing and work today. Move the sessions somewhere shared when the export ritual starts failing under deadline, because that is the week it matters most.

Frequently asked questions

Where does Claude Code store session transcripts?

As of August 2026, transcripts are JSONL files under the projects folder of Claude Code's config directory, by default a path like ~/.claude/projects/ with one file per session, on the machine where the session ran. The entry format is internal and changes between releases, so for durable artifacts use /export or the headless interfaces rather than parsing the files directly.

How do I stop Claude Code from deleting sessions after 30 days?

Set cleanupPeriodDays in settings.json to a larger number. By default Claude Code deletes transcripts older than 30 days on startup, and checkpoints are deleted along with their sessions. For sessions that matter (anything behind a merged PR), also keep an /export copy or an automated archive, since a settings default on one machine is not an audit trail.

Can a teammate open my Claude Code session?

Not a local CLI session, as of August 2026. Shareable links exist only for Claude Code on the web (Anthropic's cloud product), where a session can be made team-visible or public and viewed by link. Remote Control connects your own devices to your own local session on the same account. For a local session, a teammate sees what you export: an /export file, an archived transcript, or the scrollback of a tmux session on a machine they can reach.

How do I find the Claude Code session that produced a pull request?

Two built-in ways: run claude --from-pr with the PR number to open the session picker filtered to sessions linked to that pull request, or open claude --resume and paste the PR URL into the picker's search. Both run on the machine where the session happened, so this works for the operator or for a reviewer working at (or screen-sharing with) that machine.

Does /export capture what the agent actually did, or just the chat?

Both. The export renders the conversation with tool outputs included: commands run, their results, and file operations appear as readable text alongside the prompts and replies. What it cannot include is anything that happened outside Claude Code, such as commands the operator ran in another pane; for that, capture the terminal scrollback too (tmux capture-pane -p -S - writes the whole history to stdout).