Argus Review
Argus is an open-source code review tool built by
Redesign Health.
It reviews pull requests by decomposing each change into the flows it
participates in, dispatching repository-aware specialist agents in parallel
against those flows, validating findings before surfacing them, and
persisting every round so later rounds can check what was resolved,
regressed, or still open instead of re-reviewing from scratch. The
architecture borrows from the same ideas now showing up in the broader
agentic-harness conversation: stochastic and deterministic hooks composed
deliberately, just-in-time context retrieval, structured outputs, and
explicit coverage accounting.
For the design principles and production results behind Argus, see the
agentic code review harness write-up
on our site.
The prompts Argus ships with are opinionated — they encode one team's
production coding standards, not a neutral default. Expect to adapt them
to your own codebase and conventions (see
Adapting Argus to your team) rather than
running them unmodified.
Cost Responsibility
Argus makes API calls to third-party services (Anthropic, OpenAI, and
optionally GitHub) using your API keys. You are solely responsible for
all token consumption and associated costs incurred by running Argus.
Costs vary significantly depending on PR size, repository complexity,
and configuration — in production use, a single review may cost anywhere
from approximately $2 to $42 or more in API fees. Redesign Health does
not monitor, limit, or reimburse these costs. By using Argus, you
acknowledge that you bear full financial responsibility for any and all
API charges incurred through your credentials.
No Warranty; Limitation of Liability
Argus is provided "AS IS" and "AS AVAILABLE," without warranty of any
kind, express or implied, including but not limited to the warranties of
merchantability, fitness for a particular purpose, accuracy, or
non-infringement. Redesign Health Inc. makes no representation or
warranty that Argus will be error-free, uninterrupted, secure, or free of
bugs or defects.
To the fullest extent permitted by applicable law, in no event shall
Redesign Health Inc., its affiliates, officers, directors, employees, or
agents be liable for any indirect, incidental, special, consequential, or
punitive damages, or any loss of profits, data, use, or goodwill, arising
out of or in connection with your use of or inability to use Argus,
regardless of the theory of liability (contract, tort, strict liability,
or otherwise), even if advised of the possibility of such damages.
Your use of Argus is at your sole risk. This tool performs automated code
review and may produce inaccurate, incomplete, or misleading findings. It
is not a substitute for human code review, security auditing, or
professional judgment. You are solely responsible for any decisions made
or actions taken based on Argus's output.
For the full license terms, see the Apache License 2.0
included in the repository.
- Cost Responsibility
- No Warranty; Limitation of Liability
- How it works
- Getting started
- Using Argus
- Managing secrets
- Connecting a database
- Adapting Argus to your team
- Measured results
- Docs
How it works
A pull request goes in. Argus's planner groups the changed files into
"system groups" (roughly: one per feature area touched), assigns specialist
co-reviewers where the file patterns warrant it (security, SQL, infra, ...),
and flags anything that needs a cross-file pass. Each group and specialist
then runs as its own Claude Agent SDK session — with Read/Glob/Grep
tools against a SHA-pinned local git worktree, not a shared context window
— in parallel. A coverage check verifies every changed file got reviewed by
someone (gaps get a targeted follow-up pass), and a final writer step
consolidates every finding into one review with a verdict and severity
tags.
fetch_diff → scope_gate → plan → [system reviewers ‖ specialists ‖ cross-cutting] (parallel)
→ check_coverage → (fill_gaps if needed) → write_review → persist
Scope and workload halts
Before dispatching reviewer sessions, Argus checks the whole PR (merge base to
head, on every round, including incremental and lite rounds). If the PR
contains more than one independently mergeable behavior, or Argus cannot
verify its scope, the review halts with a BLOCKING verdict, HIGH risk,
and no findings. The same happens when the plan needs more reviewers than
ARGUS_REVIEWER_DISPATCH_BUDGET (default 16, range 3-50), or when more
than 50 gap-fill reviewers are needed. The response carries a halt
object with one of these codes: scope_split, scope_unverified,
dispatch_budget_exceeded, gap_fill_cap_exceeded. A successful review
carries a scope receipt pinned to the reviewed head SHA.
A halted round is not a reviewed round: it is stored with a null verdict,
so the next run still diffs from the last reviewed SHA. Argus does not
revoke approvals issued before this guard was enabled, including stored
approvals for the same SHA. External merge gates must reject the latest
halt outcome instead of accepting any historical APPROVE row.
A human can authorize a multi-behavior PR, or a plan over the budget (up to 50
reviewers), for one exact head:
argus review owner/repo --pr 123 \
--review-override-sha HEAD_SHA \
--review-override-reason "why this PR stays together"
Both flags are required together. The SHA must equal the head Argus
resolves, or the run fails before it spends anything (with --sha,
pass the full 40-character SHA). The reason (1-500
characters) is stored in scope.override_reason. These flags exist only
on the CLI, never on the API request. Agents and skills must not add
them automatically. They never override scope_unverified or
gap_fill_cap_exceeded.
Full design rationale is in docs/ARCHITECTURE.md.
Getting started
Prerequisites:
git
- Python 3.12+
- The
claude CLI (Node.js) —
the Claude Agent SDK spawns it as a subprocess for every reviewer session
- Three API keys — see Managing secrets
Run:
export ANTHROPIC_API_KEY=...
export GITHUB_TOKEN_RO=...
export OPENAI_API_KEY=...
uvx --from argus-code-review argus review owner/repo --pr 123
Prefer a .env file over exporting in your shell? Copy
.env.example to .env, fill in the three keys above, and
Argus picks it up automatically (see Managing secrets).
That's it for a first run. With no other configuration, Argus stores round
history and pipeline checkpoints in a local SQLite database at
~/.local/share/argus/history.db — nothing else to set up.
uvx --from argus-code-review argus ... downloads the argus-code-review
package into a throwaway environment and runs its argus console script —
the --from is required because the installable package name
(argus-code-review) and the console script it provides (argus) differ,
and uvx only infers the script name from the package name when they
match. If you'll be running Argus repeatedly, install it once instead of
re-resolving it every invocation:
uv tool install argus-code-review
argus review owner/repo --pr 123
Using Argus
# Review an open PR
argus review owner/repo --pr 123
# Review a specific commit against a base ref (no open PR required)
argus review owner/repo --sha abc123 --base-ref main
# Write markdown + JSON output
argus review owner/repo --pr 123 -o review.md
# Publish the review as a PR comment (upserts on re-run) and set a commit status
argus review owner/repo --pr 123 --post --commit-status
# Dismiss a finding before the next round
argus review owner/repo --pr 123 --dismiss "B2 -- pre-existing, not from this PR"
# Override the reviewer models (or set ARGUS_SPECIALIST_MODEL/ARGUS_FRONTIER_MODEL instead).
# --frontier-model controls both the planner/coverage tier AND the cross-cutting
# reviewer (defaults to claude-opus-5-5).
# Cost note: --specialist-model here overrides the bulk reviewer path (system
# reviewer, specialists, tests-and-docs) from its low-cost Gemini default onto
# claude-sdk with the specified model, and also updates the writer and lite-review
# paths -- both flags in this example trade cost for reasoning headroom, don't use
# them together as a low-cost default. Any non-empty --specialist-model value also withholds
# the 1M-context beta from that same highest-volume path, since the beta is
# only verified against the unoverridden default (autocompact may thrash on
# long reviews under this override -- see argus/runners.py for the tradeoff).
argus review owner/repo --pr 123 --specialist-model claude-opus-5-5 --frontier-model claude-opus-5-5
# Clear an already-set ARGUS_SPECIALIST_MODEL/ARGUS_FRONTIER_MODEL for just this
# run by passing an empty string -- useful when the env var is set globally
# (e.g. in your shell profile or CI) but you want one invocation to use the
# hardcoded default instead.
argus review owner/repo --pr 123 --specialist-model ""
# Inspect and export the packaged prompts
argus prompts list
argus prompts export ./my-prompts
What you get back:
- A formatted review comment (Markdown) with a verdict (
APPROVE /
BLOCKING), a risk level, and findings tagged B1, B2, ... (blocking)
or S1, S2, ... (suggestion).
-o review.md writes that Markdown to a file, plus a sibling review.json
with the full structured response.
- Re-running against the same PR (same
owner/repo + --pr) picks up the
prior round from storage automatically: round 2+ verifies whether
previously reported findings were resolved, regressed, or are still open,
scoped to just the commits since the last review — not a full re-review.
Managing secrets
Argus reads configuration from environment variables, or from a .env file
in the working directory (add it to .gitignore — never commit it).
.env.example lists every variable Argus reads, required
and optional, with comments — copy it to .env and fill in what you need.
Set ARGUS_NO_DOTENV=1 in the real environment to ignore .env files
entirely (for service workers that run in a directory they do not control).
Three keys are required for a first run:
| Env var |
Used for |
ANTHROPIC_API_KEY |
The Claude Agent SDK reviewer sessions and the planner/coverage/writer calls |
GITHUB_TOKEN_RO |
Fetching the PR diff and cloning the repo into the review worktree |
OPENAI_API_KEY |
Structured extraction of the final review (see the note in Getting started) |
GITHUB_TOKEN_RO needs read-only access: Contents: read + Pull
requests: read on a fine-grained PAT, or repo read on a classic one.
How you get these values into the environment is up to your setup —
export them in your shell, load them from a secrets manager in CI, or use
a .env file locally. Argus itself has no opinion and no cloud dependency
for secrets; it just reads os.environ.
The full configuration surface (storage URLs, prompt overrides, tracing,
etc.) is documented where each feature is introduced below, and summarized
in docs/STORAGE.md for storage-specific variables.
Tracing reviewer sessions (optional)
Every reviewer subagent session is wrapped in a LangSmith @traceable
span. Tracing is off by default and turns on automatically the moment
LANGSMITH_API_KEY is set — no flag, no code change. LANGCHAIN_TRACING_V2=true
also activates it (the module docstring in argus/runners.py documents the
same behavior) — useful if you're already in a LangChain-heavy environment
where that variable is set ambiently:
export LANGSMITH_API_KEY=...
export LANGSMITH_PROJECT=argus # optional; defaults to LangSmith's own default project
Leaving LANGSMITH_API_KEY unset is the normal, fully-supported case —
Argus runs identically either way, just without traces. There's nothing
else to configure: no separate on/off switch, and nothing in Argus itself
fails or degrades based on whether tracing is enabled.
If you're proxying ANTHROPIC_API_KEY/OPENAI_API_KEY through your own
credential-vending layer (see Managing secrets),
LangSmith isn't part of that Anthropic/OpenAI proxying by default — set
LANGSMITH_API_KEY (and, if you're also proxying the LangSmith endpoint
itself, LANGSMITH_ENDPOINT) the same way you'd set any other env var
for this process.
Connecting a database
Argus needs somewhere to keep round history (so re-reviewing a PR knows
what was already found) and pipeline checkpoints (so a crash mid-run
can resume). Three modes are supported, resolved automatically from which
environment variables are set — there's no --backend flag.
Recipe: local, zero-config (default)
Set nothing. Both round history and checkpoints land in a local SQLite file
at ~/.local/share/argus/history.db (created automatically on first run).
Good for solo use and for trying Argus out — this is what the quickstart
above uses.
Recipe: shared Postgres, e.g. Supabase
Use this to share round history across a team or CI. Any Postgres works;
Supabase is a common zero-ops choice.
- Create a Supabase project (or use an existing one), then grab its
pooler connection string (Project Settings → Database → Connection
string → "Transaction" pooling mode, port
6543) — the pooler is what
you want for a short-lived CLI process like Argus, not the direct
connection on port 5432.
- Apply the schema, in order:
psql "$SUPABASE_DB_URL" -f schema/008_add_code_reviews.sql
psql "$SUPABASE_DB_URL" -f schema/009_add_reviewer_version.sql
psql "$SUPABASE_DB_URL" -f schema/010_add_review_patterns.sql
psql "$SUPABASE_DB_URL" -f schema/011_add_review_progress_columns.sql
psql "$SUPABASE_DB_URL" -f schema/015_create_agent_runs.sql
The gaps in that numbering (no 001-007 or 012-014) aren't missing
files — these five are self-contained extracts from a longer internal
migration series, and 008 creates the schema from scratch, so nothing
earlier is required. Apply exactly the five files above, in order, and
you have the complete schema.
- Set the connection string and run Argus as usual — that one variable
switches both round history and checkpointing to Postgres:
export SUPABASE_DB_URL="postgresql://postgres.xxxx:pass@aws-0-region.pooler.supabase.com:6543/postgres"
argus review owner/repo --pr 123
(SUPABASE_DB_URL is accepted as an alias for ARGUS_DB_URL — if you're
pointing at a non-Supabase Postgres instance, use ARGUS_DB_URL instead;
they're equivalent, and if both are set ARGUS_DB_URL wins.)
Recipe: HTTP storage backend
For environments that can reach HTTPS but not a raw Postgres port (e.g. a
sandboxed agent runtime with egress restricted to port 443), or for teams
that don't want to expose their database directly to wherever Argus runs:
route storage through your own HTTP API with ARGUS_STORAGE_READ_URL /
ARGUS_STORAGE_WRITE_URL (optionally ARGUS_STORAGE_AUTH for a bearer
token your service checks). The full two-endpoint contract — everything
you need to implement a compatible backend service — and mode-resolution
details are in docs/STORAGE.md.
Adapting Argus to your team
Argus ships with a full set of production review prompts — 21 files, one
per reviewer role — rather than a thin default. Adapting them to your team
is the main lever for making Argus yours.
Editing what Argus looks for
argus prompts export ~/.config/argus/prompts # copy the packaged prompts out
$EDITOR ~/.config/argus/prompts/pr-review-subagent.md
argus review owner/repo --pr 123 # no env var needed — it's already found