Open Code Review: Alibaba's AI code reviewer at 1/9 of the tokens

Alibaba open-sourced the AI code reviewer its engineers use: 54,871 ★ on 21 November 2026, fewer false alarms and ~1/9 of a general-purpose agent's tokens.

By HexaLab · · 4 min read

In 30 seconds

  • alibaba/open-code-review (Go, Apache-2.0) has 54,871 stars as of 21 November 2026, 4,457 of them gained in a single week.
  • Born as Alibaba's internal assistant, used for two years by tens of thousands of developers, it mixes a deterministic pipeline with an LLM agent.
  • Against Claude Code on the same model, Alibaba claims higher precision and F1 for ~1/9 of the tokens, at the price of lower recall.
Contents 6
  1. Where the tool comes from
  2. The hybrid design: deterministic code where mistakes are not allowed
  3. The benchmark: precision versus recall
  4. How to try it
  5. The context: AI code review is becoming a market
  6. HexaLab's take

Open Code Review (the ocr command) is the AI code-review tool Alibaba used internally, now open source under Apache-2.0. The alibaba/open-code-review repository, written in Go and created on 18 May 2026, had 54,871 stars as of 21 November 2026, including 4,457 gained over the past week according to GitHub Trending. Its promise: precise line-level comments, fewer false alarms and roughly 1/9 of the tokens a general-purpose agent such as Claude Code uses on the same model. It works with any OpenAI- or Anthropic-compatible endpoint — which makes it affordable for a small team's CI.

Where the tool comes from

According to its README, Open Code Review started life as Alibaba Group's official internal AI code-review assistant. Over two years it served tens of thousands of developers and, Alibaba says, identified "millions of code defects". The group then incubated it into an open-source project.

54,871GitHub starsas of 21/11/2026
4,457stars in one weekGitHub Trending
1,505annotated defects (AACR-Bench)
200real pull requests tested

In practice, ocr reads Git diffs and sends the changed files to a configurable LLM through a tool-using agent — one that can read whole files, search the codebase and look at other changed files — then produces structured comments pinned to the right line. The ocr scan command goes further and reviews whole files or directories without a diff, for auditing unfamiliar code.

The trouble with general-purpose agents

The README starts from something many teams have noticed after handing reviews to a prompt-driven general-purpose agent:

  • incomplete coverage: on large changesets, the agent "cuts corners" and only reviews some of the files;
  • position drift: the reported issue does not match the right line, or even the right file;
  • unstable quality: a small prompt change swings the result significantly.

The root cause, according to Alibaba: a purely language-driven architecture puts no hard constraints on the process.

The hybrid design: deterministic code where mistakes are not allowed

Open Code Review's answer is to split the roles. What must not go wrong is handled by conventional code; judgment is left to the agent.

How Open Code Review reviews a pull request
  1. 1File selection

    Deterministic code: which files to review, which to filter out.

  2. 2Bundling

    Related files grouped into units, each handled by an isolated sub-agent.

  3. 3Targeted rules

    Template engine: rules matched to each file.

  4. 4Agent analysis

    The LLM judges, reads context, searches the code.

  5. 5Positioning and reflection

    External modules check each comment's line and content.

The bundling is clever: message_en.properties and message_zh.properties, for example, are reviewed together. Each bundle runs in a sub-agent with its own isolated context — a divide-and-conquer approach that stays stable on very large changesets and allows parallel review. On the agent side, prompts and the toolset were tuned by analysing tool-call traces from production.

The built-in ruleset covers NPEs (null pointer dereferences), thread safety, XSS flaws and SQL injection, across several languages.

The benchmark: precision versus recall

Alibaba built AACR-Bench: 50 popular open-source repositories, 200 real pull requests, 10 languages and 1,505 annotated issues, cross-validated by more than 80 senior engineers. The dataset is public on Hugging Face.

Two terms to read the results: precision is the share of reported issues that are real defects (less noise to triage); recall is the share of real defects that get found (fewer bugs slipping through). F1 combines both.

Open Code Review vs general-purpose agent (same model)
Open Code ReviewGeneral agent (Claude Code)
PrecisionSignificantly higherBaseline
F1Significantly higherBaseline
RecallLower (deliberate)Baseline
Tokens used~1/91
Review timeFasterBaseline

Source: alibaba/open-code-review README, AACR-Bench — Alibaba's figures

These results are self-reported by Alibaba, on a benchmark Alibaba built; the README shows them as a chart. The lower recall is a deliberate trade-off: five accurate comments beat twenty of which half are wrong, because an overly chatty reviewer ends up ignored.

How to try it

Prerequisite: Git 2.41 or newer. Installing the CLI and configuring the model, per the README:

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

ocr config provider   # pick a built-in provider or add a custom one
ocr config model      # pick the model

Then, inside your project:

ocr review                       # pending changes (staged, unstaged, untracked)
ocr review --from main           # current branch since it left main
ocr review --commit abc123       # a single commit
ocr scan --path internal/agent   # review a whole directory, no diff
ocr review --format json --output result.json

Already using a coding agent? The "skills" install with npx skills add alibaba/open-code-review for Claude Code, Codex, Cursor or Kimi Code. Delegation mode lets your agent do the analysis with its own model while ocr handles file selection and rules — no separate API key needed (but your agent's own limits and costs still apply). The docs also cover CI/CD integration with GitHub Actions, GitLab CI and Gerrit.

Two practical details matter for daily use. First, an interrupted review over a commit range is not lost: ocr session list shows the sessions, and --resume <session-id> picks up where the tool stopped, including for ocr scan. Second, the Session Viewer lets you browse a review in the browser and mark each comment as fixed or ignored. For CI, JSON output (--format json) is the easiest to consume: a script can fail the pipeline only when a comment hits a critical rule, such as SQL injection. Finally, the tool runs on Windows, macOS and Linux, and can be extended with external tools through an MCP server.

The context: AI code review is becoming a market

Open Code Review arrives as GitHub launched a deeper tier, Copilot code review Max, at Universe 2026. The difference: Alibaba's tool is open, self-hostable and independent of any model provider.

  1. Repository created

    alibaba/open-code-review, Apache-2.0.

  2. 54,871 stars

    +4,457 over the past week (GitHub Trending).

HexaLab's take

This is one of the most useful open-source projects of the moment for a real team: giving deterministic code the parts that must not fail, and the LLM only the judgment, is a sound idea that travels well beyond code review. The figures come from Alibaba and its own benchmark; test it on your last few PRs before enforcing it in CI, and don't let it replace human review of sensitive changes.

Verified sources

  1. GitHub — alibaba/open-code-review (README) github.com
  2. GitHub API — alibaba/open-code-review api.github.com
  3. GitHub Blog — Universe 2026 (Copilot code review Max) github.blog
  4. GitHub Trending — weekly github.com

Written and checked by HexaLab from the sources listed.

Share WhatsApp LinkedIn X Facebook