Code review that checks out and runs your pull request

Getting a code review backed by executed tests takes two separate layers: a reviewer that reads a checkout of the repository, and an execution environment that builds the branch and runs the suite. In Capy, Capy Review is static and never executes code; it checks out the pull request head commit, traces callers, imports, and types across packages, and posts inline findings. Code execution happens in your CI and in a Capy coding thread on an isolated cloud machine, which owns pull requests it opens, joins human pull requests on an @capy mention, or launches from a GitHub-triggered automation. Pairing the two gives you static defect tracing alongside a thread that runs your tests, reproduces flagged bugs, and pushes verified fixes.
Why reading the checkout and running the code stay separate
A diff-only reviewer misses bugs hidden in callers and type definitions two files away. Running unreviewed pull request code inside the review runner brings slow boots, flaky external dependencies, and broader permissions than a reviewer should hold.
Splitting static review from execution keeps both fast and predictable. Capy Review checks out your repository at the pull request's current head commit so it can search callers, follow imports across package boundaries, and check AGENTS.md conventions, while never executing code or holding push access. Your CI runs the deterministic build and test gate on every push, and a Capy coding thread runs live commands, Docker services, and browsers on its own isolated Linux VM when a pull request needs reproduction or fixes.
| Layer | What it inspects or runs | Executes code | Pushes fixes |
|---|---|---|---|
| Capy Review | Repository checkout at the PR head commit; traces callers, imports, types, and AGENTS.md rules | No | No |
| Your CI | Deterministic build, lint, typecheck, and test suite on every push | Yes | No |
| Capy coding thread | Commands, tests, Docker containers, Chrome, and previews inside an isolated Linux VM | Yes | Yes, to the PR branch |
For how review rounds, thresholds, and incremental re-reviews behave in GitHub, read How automated code review works in GitHub.
Three ways to execute tests on a pull request
Once Capy Review is turned on per repository in Settings → Review, you have three ways to pair its static findings with live code execution on a cloud machine:
- Let the thread that opened the PR run the loop. When a Capy thread opens a pull request, that thread owns it. It runs on a default 4 vCPU, 16 GB Linux VM with Docker and Google Chrome, where it installs dependencies, runs your tests, and can start the app before opening the PR. When Capy Review posts findings, the thread triages them, marks false positives irrelevant, fixes high-severity defects, and re-runs tests. If CI fails, the thread wakes, reads GitHub Actions logs, and pushes a fix.
- Pull a coding thread onto a human PR with
@capy. On a pull request a teammate opened, comment@capywith the exact verification you want, or click Chat with Capy on the pull request page in Capy. If no thread owns that pull request yet, Capy creates one in the project containing the repository and links it to the PR going forward. Use@capy reviewinstead when you only want another static review round, optionally narrowed with trailing text like@capy review focus on the migration. - Trigger a test thread from a GitHub automation. For branches or labels that need checks your standard CI does not run, configure an automation on GitHub events such as PR opened, pushed, labeled, checks, or
workflow_run. Filter by repository, branch, author, or label so each run starts a cloud thread only where live verification pays off.
A comment on a human pull request can target one specific finding from the review:
@capy check out this branch, run the integration tests, and reproduce the issue the review flagged in billing/settle.ts
A GitHub-triggered automation prompt can run heavier verification automatically on labeled pull requests:
Check out this pull request branch, run the database migration against a seeded test database, and execute the integration suite.
If a test or migration fails, comment on the pull request with the failing command, the stack trace, and the minimal reproduction.
What any thread can run depends on your project's Dev environment, which defines setup scripts, startup entries, named commands, and snapshots. When the branch serves a web app, the thread can publish a live preview URL so reviewers open the running branch alongside the diff.
A worked example: proving a race condition CI missed
An engineer opens a pull request that batches invoice settlements in billing/settle.ts. Standard unit tests pass in CI because the test suite mocks the database and runs requests one at a time.
- Automatic review runs in Every push mode at the pull request head commit. Capy Review reads callers across the ledger package without executing code and posts an Investigate finding explaining that two concurrent webhook retries can pass the status check before either transaction commits.
- The author comments
@capy check out this branch, start Postgres in Docker, write a test firing two concurrent settle webhooks against billing/settle.ts, and report whether the race reproduces. - Capy starts a thread in the project on a cloud VM, boots Postgres, runs the new concurrency test, and confirms the duplicate payout.
- The thread wraps the status check and update inside a transaction, re-runs the full test suite until green, and pushes the fix plus the new regression test to the branch.
- The new commit starts an incremental re-review covering only the latest diff with the whole PR as context. Capy Review marks the finding resolved, CI turns green, and the author merges.
Where Capy fits
Capy pairs read-only code review with cloud coding threads that run your environment:
- Starts review rounds automatically per repository (Once when a PR opens, or Every push) under Settings → Review, or on request through
@capy review, the PR page in Capy, orPOST /api/v1/reviews, with an optionalcapy/reviewcommit status. - Labels every finding with category from Bug, Risk, Maintainability, or Refactor, severity from High, Medium, or Low, confidence as Confirmed or Investigate, file and line, and optional notes. Default posting threshold is medium, findings marked irrelevant stay suppressed across re-reviews, and a resolved finding whose fix did not hold returns.
- Keeps review machines read-only with no push access and no GitHub token on the VM, while PR-owning threads run tests, inspect GitHub Actions logs, attach browser screenshots or video, install mobile builds on a cloud phone on Pro and above, and expose live previews.
- Includes monthly review credits on every plan, with 100 on Free, 250 on Lite, 1,250 on Pro, and 2,500 on Max. Each round uses 1 credit for Low effort, 5 for Medium, and 10 for High. Past the monthly allowance, reviews bill Capy credits for tokens used and machine awake time, and never draw from your connected subscriptions or API keys.
And where it doesn't:
- Capy Review itself never executes code. It proves bugs by tracing source files, not by running your compiler or tests, so keep CI as your required check gate on every push.
- Launching a coding thread to run tests on every pull request spends plan machine minutes and then Capy credits. Narrow GitHub automations with branch, label, or author filters instead of running them on every pull request.
- A thread can run only what your Dev environment can start. Private services need Tailscale or a staging URL, and secrets belong in environment variables.
- Capy works on GitHub.com only. GitHub Enterprise Server, GitLab, and Bitbucket are not supported.
Follow-up questions
Does Capy Review run my tests?
No. Capy Review is read-only and inspects a checkout of your repository at the pull request head commit without executing code. To execute tests on the branch, pair it with your CI and a Capy coding thread triggered by opening the PR from Capy, commenting @capy, or running a GitHub automation.
How do I make Capy run tests on a pull request a teammate opened?
Comment @capy on the pull request with the commands or bug you want checked, or click Chat with Capy on the pull request page in Capy. Capy starts a thread in the matching project if none exists, runs your checks on a cloud VM, and links that thread to the PR.
What happens if someone pushes new commits during a review?
A push while a review is running starts a fresh round against the new head commit. Once a round finishes, later pushes trigger incremental re-reviews that inspect only the commits since the last reviewed head while keeping the full pull request as context.
Can reviewers open the running app from the pull request?
Yes, when a coding thread starts your server on its cloud machine and publishes a preview. The pull request review page offers a live preview link so reviewers can test the running branch while reading the diff.




