---
title: "Run a branch review"
description: "Ask Autohand Code to inspect changed files for regressions, missing tests, security issues, and product contract drift."
seo:
  canonical: "https://autohand.ai/use-cases/run-a-branch-review/"
---
Run a branch review with Autohand Code is a review workflow that inspects a branch or local diff for bugs, regressions, missing tests, security risks, and product contract drift.

## At a glance

| Question | Answer |
| --- | --- |
| Best for | checking a branch before human review, merging a hotfix, or sending a PR through CI |
| Primary inputs | Current diff, branch name, or PR context; Product expectations that are not obvious from code; Priority areas such as auth, billing, migrations, UI state, or security |
| Autohand Code returns | A review report with findings ordered by severity and file references. |
| Avoid when | the author only wants formatting feedback or broad style preferences |

## How Autohand Code handles this workflow

1. Compares changed files with nearby contracts, tests, routes, and data paths.
2. Ranks findings by user-visible or operational severity.
3. Points to exact files and lines when possible.
4. Separates blocking defects from test gaps and open questions.

## Best inputs

- Current diff, branch name, or PR context
- Product expectations that are not obvious from code
- Priority areas such as auth, billing, migrations, UI state, or security

## Strong prompt

```bash
autohand -p "Review my current branch for bugs, risks, and missing tests"
```

## Autohand Code CLI options

- Use `/review` inside an interactive session for the built-in staff-level review flow.
- Run `git diff main...HEAD | autohand -p "Review this diff for bugs, regressions, missing tests, and security risks"` for a scripted branch check.
- Use `--restricted` when the review should inspect files and diffs without running risky commands.

## Review before accepting

Strong findings explain the failure mode, affected user or system, and a concrete verification path.

## Source and validation signals

Autohand AI maintains this workflow as first-party product guidance for Autohand Code. Use the [Autohand Code CLI Playbook](https://github.com/autohandai/code-cli/blob/main/docs/AUTOHAND_PLAYBOOK.md), [CLI reference](/working-with-autohand-code/cli-reference), and [configuration reference](https://github.com/autohandai/code-cli/blob/main/docs/config-reference.md) when choosing between interactive mode, command mode, auto-mode, feature-enabled /goal, /settings, skills, MCP, and permission settings. The related resources below link to product docs and tutorials for the workflow, and the final answer should name repository-specific files, commands, outputs, or docs that a reviewer can verify.

## Frequently asked questions

**What is Run a branch review with Autohand Code?**

Run a branch review with Autohand Code is a review workflow that inspects a branch or local diff for bugs, regressions, missing tests, security risks, and product contract drift.

**When should a team use Run a branch review?**

Use it when the next reviewer needs a bug-focused pass instead of a general summary.

**What evidence should reviewers check for Run a branch review?**

Strong findings explain the failure mode, affected user or system, and a concrete verification path.

## Related resources

**[Tutorial: Run a Code Review on Your Branch](/tutorials/run-code-review)**

Review local changes for bugs, regressions, and missing tests.

**[Tutorial: Build a Code Reviewer Agent](/agent-sdk/tutorials/100-code-reviewer-agent)**

Model a reusable review agent with structured findings.

**[Guide: Git Flow Automation](/guides/git-flow-automation)**

Fit branch review into the larger PR workflow.
