OpenCodeReview is a command-line AI code review tool that reads Git diffs, sends changed files to a configurable LLM through an agent with tool use, and produces structured review comments anchored to specific lines. The agent can read full files, search the codebase, and inspect other changed files for context. It began as Alibaba Group's internal code review assistant before being released as open source.
Its architecture splits work between deterministic engineering and the agent. Engineering logic decides which files to review and which to filter, bundles related files into review units that each run as a sub-agent with isolated context, matches review rules to file characteristics through a template engine, and runs separate comment-positioning and comment-reflection modules to check location and content accuracy. The agent handles dynamic decisions and context retrieval with prompts and a toolset tuned for review from production tool-call traces.
Beyond diff review, ocr scan reviews whole files or directories without needing a diff, and interrupted range or scan reviews can be resumed by session ID. A delegation mode hands file selection and rule resolution to OCR while your coding agent's own model performs the review, so no separate API key is needed. Plugins exist for Claude Code, Codex, Cursor, and OpenCode, and there are CI integrations for GitHub Actions, GitLab CI, GitFlic CI, and Gerrit.
On AACR-Bench, a benchmark of 200 pull requests from 50 open-source repositories across 10 languages with 1,505 annotated ground-truth issues, the tool reports higher precision and F1 than general-purpose agents using the same model, at roughly one ninth of the tokens, with lower recall as a stated trade-off.
Features
- Review modes: workspace changes, branch ranges from a merge base, single commits, and full-file scans
- Line-level comments: structured findings positioned on specific lines, with JSON output for host agents
- Deterministic file selection and bundling: related files are grouped and reviewed in isolated sub-agent contexts
- Rule matching: review rules targeted by path and file characteristics via a template engine
- Positioning and reflection modules: post-processing checks on comment location and content
- Delegation mode: your coding agent's LLM runs the review; OCR supplies file selection and rules
- Provider configuration: interactive provider and model setup with connectivity testing, or environment variables
- Coding-agent plugins: Claude Code, Codex, Cursor, OpenCode, QCA Forward, and a portable agent skill
- CI/CD integration: GitHub Actions, GitLab CI, GitFlic CI, and Gerrit
- Session viewer and telemetry: browse and replay review sessions in a browser; OpenTelemetry export
- MCP server support: extend the review agent with external tools