Skip to content

PR review

kapacitor review launches a Claude Code session equipped with MCP tools that query the implementation transcripts behind a pull request. Reviewers can ask why code was changed, see what alternatives were considered, and verify test coverage — all grounded in what actually happened during development, not just the diff.

Terminal window
kapacitor review <pr-url>

The URL is any GitHub PR URL — https://github.com/<owner>/<repo>/pull/<number>. The command spawns Claude Code with six MCP tools wired up against your tenant:

ToolPurpose
get_pr_summaryOne-shot overview: which sessions touched this PR, who ran them, when.
list_pr_filesFiles changed in the PR, with the sessions that touched each.
get_file_contextFor a file, the relevant transcript turns and tool calls.
search_contextFull-text search across transcripts of sessions linked to the PR.
list_sessionsAll sessions linked to the PR.
get_transcriptFetch a session transcript (paged) by ID.

You then ask Claude review-style questions and it answers from the transcripts — not the diff.

The point of kapacitor review is that it can answer questions a static diff can’t. Phrasings that work well:

Why something is the way it is. The killer use case — “the diff shows what, the transcript shows why.”

  • “Why did this PR drop the cache invalidation around line 142?”
  • “Why is this method async when nothing awaits its result?”
  • “Why did we pick channels over a queue for the worker pool?”

What was tried first. Rejected approaches and dead ends rarely show up in the final diff:

  • “What approaches did the agent try before settling on this implementation?”
  • “Were retry-on-failure or circuit-breaker alternatives considered?”
  • “Did the agent ever try doing this client-side?”

Test coverage and verification. Did the agent actually run things end-to-end, or just lean on mocks?

  • “What tests were written for this change? Did any fail and get fixed?”
  • “Did the agent verify this against the real Postgres, or only with mocks?”
  • “Were there flaky tests the agent worked around?”

File-by-file walk-throughs. Pair list_pr_files with get_file_context:

  • “Walk me through what changed in src/auth/login.ts and why.”
  • “Which session touched migrations/0042.sql? Show me the relevant turn.”

Plan adherence. Was the original task scope respected?

  • “What was the agent’s plan at the start? Did it complete everything?”
  • “Is anything in this PR outside the original task?”

If a question returns “no relevant context”, try rephrasing — the underlying search_context is FTS, so a different key term often surfaces the right transcript.

kapacitor review is a local-CLI command, but you don’t need the CLI installed on the device you’re reviewing from. Launch a hosted Claude agent from the dashboard (see Hosted agents), and run kapacitor review <pr-url> inside its terminal — the hosted agent has the CLI baked in and the MCP server resolves your tenant credentials automatically.

This is the common path for reviewers who:

  • Are reviewing from a phone or browser-only environment.
  • Don’t run Claude or Codex locally and don’t want to install the CLI just to inspect one PR.
  • Want to share a review session with a teammate (multi-user input on hosted agents means two people can drive the same review).

For reviewers with the CLI already installed locally, the local invocation is faster — no daemon round-trip.

kapacitor review works on any PR your tenant can see. The transcripts queried are the ones produced by kapacitor-captured sessions linked to the PR (matched by branch + repo + temporal proximity to the PR’s commits). PRs with no captured sessions still work — there’s just nothing for the MCP tools to return.

The MCP tools respect the same visibility rules as the dashboard:

  • Sessions you can’t see on the dashboard, you can’t query through kapacitor review.
  • Sessions marked private are only accessible to the owner running kapacitor review.

Sharing a session with a reviewer (via the dashboard share popover) makes its transcript available to that reviewer’s kapacitor review.

PR review for sessions produced by hosted Codex agents isn’t supported yet. Sessions produced by Codex CLI hooks — i.e. Codex run locally with the kapacitor hooks installed — are reviewable through this command. The gap is specifically for Codex sessions launched via the dashboard’s hosted-agent launcher.

  • Hosted agents — where hosted Codex sessions come from.
  • The dashboard — manual browsing of PR-linked sessions.
  • Session recall — same MCP pattern, but searches every session you can see rather than just one PR’s.