
Code review is a natural use case for AI-assisted development: give a Git diff to a language model and ask it to identify bugs, risks, and questionable changes.
Once this idea enters a real engineering workflow, however, model intelligence is only part of the problem. A general-purpose agent may skip files in a large change, produce a valid observation at the wrong line, or behave differently after a small prompt change. Teams need more than occasional impressive answers. They need review coverage, precise locations, reusable rules, and repeatable execution.
Alibaba’s OpenCodeReview approaches the problem from that engineering perspective.
One-line positioning
OpenCodeReview is an AI-powered code review CLI that uses deterministic engineering to control review scope, rules, and comment placement, while an LLM agent handles context gathering and issue reasoning.
Its goal is not to become another general-purpose AI coding assistant. It focuses on code review and turns a one-off model call into a configurable, repeatable workflow that can be integrated with CI/CD.
Basic information
| Item | Details |
|---|---|
| Project | OpenCodeReview |
| Maintainer | Alibaba |
| GitHub | alibaba/open-code-review |
| Main forms | CLI, VS Code extension, CI/CD and coding-agent integrations |
| Platforms | Windows, macOS, Linux |
| Installation | npm, installation scripts, release binaries, source build |
| License | Apache-2.0 |
| Latest release | v1.8.1 as of July 31, 2026 |
According to the project README, OpenCodeReview originated as Alibaba’s internal AI code review assistant and was open-sourced after two years of internal use. It reads Git diffs, sends change sets to an agent capable of using tools, and produces structured comments mapped to specific code lines.
What problem does it solve?
General-purpose coding agents such as Claude Code, Codex, and Cursor can already read diffs and suggest improvements. A dedicated review system, however, must solve a different set of engineering problems.
1. Every relevant change must be reviewed
Large changes often span many files. If the agent alone decides what to inspect and how much context to read, some files may receive little or no attention. OpenCodeReview uses deterministic logic to select files and group related changes before assigning them as separate review tasks.
The point is not simply to fit more code into one prompt. It is to ensure that every important group of changes enters the review pipeline.
2. Comments must point to the correct location
A useful finding loses much of its value if developers must search for the actual line it refers to. OpenCodeReview adds separate comment-location and reflection components to validate and correct model output instead of treating the raw response as the final review.
3. Team rules must run consistently
Different projects, directories, and file types require different checks. A payment module may emphasize boundaries and consistency, a web endpoint may need injection and authorization checks, and Java code may require special attention to null pointers and thread safety.
OpenCodeReview matches review rules to file characteristics through a rules engine. Program logic selects the applicable rules, while the model reasons within that defined scope. This makes the process easier to reuse and debug than relying on one natural-language prompt alone.
Core features
Deterministic engineering and agent reasoning

This division of responsibility is OpenCodeReview’s most important design choice.
The deterministic layer handles file selection, related-file grouping, rule matching, comment placement, and result reflection. These stages prioritize coverage, boundaries, and predictable behavior, making them well suited to programmatic control.
The agent handles dynamic decisions. It can read complete files, search the repository, inspect other changed files, and gather the context needed to determine whether a change is actually problematic. It is not restricted to a small diff fragment.
In short, software keeps the review process disciplined, while the model handles the problems that require understanding.
Multiple review scopes
During local development, OpenCodeReview can inspect staged, unstaged, and untracked workspace changes. It can also compare two branches, review a single commit, or resume an interrupted review session.
Beyond diff review, ocr scan can inspect an entire repository, directory, or file. This is useful when taking over an unfamiliar codebase, performing a periodic audit, or reviewing code without meaningful Git history.
Rules and team workflow integration
The project supports custom rules matched by file path and type, together with integration paths for GitHub Actions, GitLab CI, and Gerrit. Teams can add AI review to the pull request workflow and generate line-level comments and summaries without asking every developer to repeat the same manual steps.
OpenCodeReview also provides plugins or skills for coding agents such as Claude Code, Codex, and Cursor. In delegate mode, OpenCodeReview prepares the review scope, rules, and context, while the host coding agent performs the review using its own model.
Configurable model providers
OpenCodeReview is not tied to one model vendor. The official documentation lists OpenAI-compatible endpoints, Anthropic, Google Gemini, Amazon Bedrock, Azure OpenAI, and other providers.
Teams can therefore choose an endpoint based on existing accounts, cost, and compliance requirements. The data boundary still matters: in the default mode, code diffs are sent to the configured LLM service. Before using it with private code, verify the provider’s data-handling policy and your organization’s internal requirements.
Who is it for?
- Individual developers who want a machine review before their final manual check.
- Open-source maintainers who want GitHub Actions to generate line-level findings and review summaries on pull requests.
- Engineering teams with shared standards that need path-specific and language-specific rules to run consistently.
- Developers already using AI coding agents who want a dedicated review layer: the coding agent implements changes, while OpenCodeReview structures and constrains the review.
Quick start
Git 2.41 or later is required. The most direct installation method is npm:
npm install -g @alibaba-group/open-code-reviewConfigure the model provider and model:
ocr config provider
ocr config modelThe interactive setup guides you through provider selection, API credentials, model configuration, and a connectivity test.
Inside a Git repository, review current workspace changes:
cd your-project
ocr reviewCompare branches or review a single commit:
ocr review --from main --to feature-branch
ocr review --commit abc123Scan an entire repository or a selected directory:
ocr scan
ocr scan --path internal/agentFor a first trial, use a non-sensitive project and observe false positives, missed issues, and token usage. Add project-specific rules after understanding the baseline behavior, then integrate the tool into pull requests or CI/CD once its output and data boundaries meet your requirements.
Conclusion
OpenCodeReview’s contribution is not proving that language models can read code. It is turning AI code review into a more controlled pipeline.
Deterministic engineering keeps scope selection, rule matching, and comment placement predictable, while the agent focuses on context-sensitive reasoning. That separation is closer to an engineering tool a team can operate over time than simply sending a diff to a general-purpose agent.
OpenCodeReview remains an assistant rather than an automatic fixer or final approval system. Its roadmap explicitly keeps automatic code changes without human review out of scope: the tool may suggest a fix, but a person must approve and apply it.
If you need a locally operated, model-flexible AI code review tool that can fit into an existing development workflow, OpenCodeReview is worth testing on a real pull request.
