Developer tools#Coding agent#Code review

OpenCodeReview: Alibaba's open-source hybrid AI code reviewer

Alibaba's open-source AI code review CLI: deterministic pipelines plus an LLM agent for line-level comments. It claims about 1/9 the tokens of a general agent.

Project facts

GitHub Ecosystem
Repositorygithub.com/alibaba/open-code-review
License
Apache-2.0
Language
Go
Stars
51,424
Data checked
2026-11-15

Snapshot figures reflect the check date and may change over time.

GitHub-generated repository card for alibaba/open-code-review, with the repo name and description on the left, the Alibaba logo on the right, and stars and forks at the bottom

If you have used a general coding agent for code review, you have probably hit the same three failures: on a large changeset the agent “cuts corners” and reviews only some files; the issues it reports land on the wrong lines; and quality swings whenever the prompt changes slightly. OpenCodeReview is Alibaba Group’s open-source AI code review CLI (command name ocr), written in Go under the Apache-2.0 license. Its core bet is architectural: steps that must not go wrong run in deterministic engineering code, and only judgment work goes to the LLM agent. The README says it started as Alibaba’s internal AI review assistant, in use for over two years; as of November 15, 2026 the repository has 51,424 stars, and the latest release is v1.13.9 (November 13, 2026).

GitHub-generated repository card for alibaba/open-code-review, with the repo name and description on the left, the Alibaba logo on the right, and stars and forks at the bottom

Core features

OpenCodeReview reads Git diffs, sends changed files to an agent with tool use, and produces structured review comments anchored to exact lines. The agent can read full files, search the codebase and inspect other changed files for context instead of reacting to the diff surface alone; ocr scan reviews whole files or directories, for auditing an unfamiliar codebase that has no meaningful diff.

The hybrid architecture splits into two layers. The deterministic layer owns the steps that cannot drift: picking exactly which files need review, bundling related files into one review unit (message_en.properties travels with message_zh.properties), running each bundle as a sub-agent with isolated context so very large changesets stay stable and review concurrently, matching rules to file characteristics through a template engine rather than prose, and running separate comment-positioning and reflection modules to correct line numbers and content. The agent layer handles dynamic decisions and context retrieval, with prompts and a toolset tuned specifically for review — the project says the toolset was distilled from tool-call traces in large-scale production data.

The engineering discipline shows in the release line too: the v1.13.9 changelog includes a run-coverage manifest that records excluded files, warnings shown in zero-finding PR summaries, and a fix so session list --json emits [] instead of null. Built-in rulesets cover multi-language defect classes such as NPE, thread safety, XSS and SQL injection; the model side speaks the OpenAI and Anthropic APIs. The repository also carries an OpenSSF Best Practices badge (passing level).

Benchmark claims

The project built its own benchmark, AACR-Bench: 50 popular open-source repositories, 200 real pull requests and 10 languages, cross-annotated by more than 80 engineers into 1,505 ground-truth issues, with the dataset published on Hugging Face. The comparison below is what the project itself reports:

MetricProject claim (same underlying model)
Precision and F1significantly higher than general agents such as Claude Code
Token consumptionabout 1/9 of a general-agent approach
Review timefaster than general agents
Recalllower than general agents — a deliberate precision-first trade-off

All of these numbers come from the vendor: Alibaba’s own organization built the benchmark, and third-party coverage (for example Synopolis’s teardown) notes that some evaluations do not name the underlying model, so the results have no independent replication yet. The benchmark measures line-level defect review only; it says nothing about whether general agents are better at writing or refactoring code. The internal usage figures — two years, tens of thousands of developers, millions of defects — are likewise the project’s own account and cannot be independently verified.

Typical use cases

  • Automated review in CI: the project ships GitHub Actions, GitLab CI and Gerrit integrations, plus an MCP server and OpenTelemetry observability, for teams that want every pull request to pass through an AI review.
  • Plugging into your coding agent: plugins and skills exist for Claude Code, Codex, Cursor, Kimi Code and OpenCode. Delegation mode lets the host agent run the review with its own model — OCR handles file selection and rule resolution, and no separate API key is needed.
  • Auditing unfamiliar code: ocr scan reviews whole files or directories without Git history, useful when you inherit a legacy codebase.
  • Working through the findings: the Session Viewer replays review sessions in a browser, letting you mark comments as fixed or ignored.

Quick start

The install command below is from the project README; you need Git 2.41 or newer:

npm install -g @alibaba-group/open-code-review

cd your-project
ocr config provider   # pick a provider, enter the API key
ocr config model      # pick a model
ocr review            # review all workspace changes
ocr review --from main --to feature-branch
ocr scan              # full-file scan

Results can be written to disk with --format json --output result.json, and an interrupted review resumes with ocr session list plus --resume. Other installation paths (install script, binaries, from source) are in the official docs.

Summary

OpenCodeReview fits teams that want AI review wired into CI or their agent workflow and care about false positives and token cost. It is upfront that recall is lower than a general agent — you trade missed findings for fewer false alarms and predictable line accuracy. Two caveats before you trust the numbers: every performance figure is vendor-reported, and although AACR-Bench is public on Hugging Face, the claims still await third-party replication. Also note that your code and diffs go to the model provider you configure — think that through for private repositories. It is Apache-2.0, written in Go, distributed as the npm package @alibaba-group/open-code-review, and the repository was still being pushed on November 14, 2026. Compared with PR-Agent, which works from PR comments, this one runs as a local CLI and pipeline tool; and if your actual pain is flaky review quality in Claude Code itself, see our earlier write-up on ECC, another take on engineering the harness.