Alibaba open-sources AI code review tool OpenCodeReview

Alibaba open-sourced OpenCodeReview, a code review tool used internally for two years. It uses a hybrid architecture combining a deterministic engineering pipeline with AI Agent to address common issues like missed reviews, location drift, and quality instability. It supports multiple languages and integrates with Claude Code, Codex, Cursor, and Kimi Code.
Key insights
Hybrid architecture separates deterministic pipeline from dynamic Agent
OpenCodeReview's architecture splits responsibilities. The deterministic engineering pipeline handles hard constraints: precise file selection based on code changes, intelligent file bundling (e.g., binding message_en.properties with message_zh.properties), fine-grained rule matching via ~54 rules per language (Java, Go, TS/JS, Python, Rust, SQL/XML mapper, properties), and separate re-location and reflection modules for comment placement. The Agent handles dynamic decisions: optimized scene prompts with multiple task templates, and a distilled tool set from production tool-call traces, including full file read, code search, and browsing other changed files.
Capabilities and ecosystem integrations
OpenCodeReview supports workspace, branch, and single commit review, breakpoint resume (ocr session), full file scan without git history, local Session Viewer for web-based review playback, SARIF/JSON output, OpenTelemetry observability, and MCP Server extension. It is available as npm CLI and as a portable Agent Skill. Plugins exist for Claude Code, Codex, Cursor, Kimi Code, and OpenCode. It supports OpenAI, Anthropic, and AWS Bedrock protocols and can reuse Claude Code's ANTHROPIC_* environment variables.
Delegation mode decouples harness from LLM capability
A notable design feature is the Delegation mode (ocr delegate preview/rule), where OpenCodeReview only performs deterministic tasks (file selection and rule parsing) while the actual review is carried out by the host coding agent's LLM. This means users don't need to provide an API key to OpenCodeReview. It effectively separates harness capability from model capability.
Engineering quality and strict contribution guidelines
The project includes a formal Assurance Case (ASSURANCE_CASE.md) with a threat model, four trust boundaries, and mitigation for T1-T7 threats mapped to Saltzer & Schroeder principles and OWASP Top 10. Contribution guidelines (AGENTS.md) require disclosure of AI tools used, line-by-line understanding of AI-generated code, and prohibit AI-generated commit attribution. CI runs english-check (including fullwidth punctuation), enforces 90% test coverage, -race and govulncheck on every push, and requires SPDX headers and LF line endings.
Benchmark results show precision trade-off
The AACR-Bench benchmark (50 popular open source repos, 200 real PRs, 10 languages, 1505 labeled issues by 80+ senior engineers) shows that compared to Claude Code on the same model, OpenCodeReview achieves significantly higher Precision and F1, token consumption of about 1/9, and faster speed. However, Recall is lower than the general agent, which the README acknowledges as a deliberate trade-off of precision over noise. The benchmark was built by Alibaba and is open for community review.