Skip to content
Install

Product · · 7 min read

A pull request reviewer that runs your own model and only posts what it verified

MendCode reviews pull requests in its daemon with the model you already use: a read-only review pass, an independent verify pass, code-graph context and one GitHub review that never blocks the merge.

Generated editorial cover. Product screenshots inside the post are unedited.

Most review bots are a hosted service with their own model and their own bill. MendCode’s reviewer runs in the daemon on your machine, with the model you already pay for, and it is off until you turn it on. It is experimental and available from the balanced tier up.

turn it on and review one pull request
/pr on
/pr review 29982

Two passes, one review

How one pull request is reviewed

01

A review pass runs as a read-only explore child in plan mode and returns its findings as JSON.

02

An independent verify pass judges each finding: confirmed, plausible or rejected. It looks at up to 10 per turn.

03

Confirmed findings are published as one GitHub review with inline comments and suggestion blocks; the strict profile adds plausible ones, marked.

The review is always posted with the event COMMENT, never REQUEST_CHANGES, so it informs the merge instead of blocking it. Each review carries a hidden HTML comment, mendcode:review head=SHA, so the same head is never reviewed twice. The merge-risk score has a floor that follows the confirmed findings and a cap of 8.

The notice a session shows when a review finishes, drawn from MendCode’s own render code.

Context from the code graph

A diff alone hides who calls the changed code. The reviewer adds the callers and callees of every changed symbol from MendCode’s code graph, two levels deep and at most 12 each, inside half of the model’s context window (context_tokens, 200,000 by default). A large diff is reviewed in parts of up to 12. The budget per pull request, tokens_per_pr, is 1,000,000 tokens, not counting cache reads.

A real run

google-gemini/gemini-cli#29982

FieldValue
Command/pr review 29982
Modelgpt-6-luna, medium effort, balanced tier
Timeabout 40 s
Tokens67,873 in · 620 out
ResultNo confirmed findings
PostedNothing: the repository has no .mendcode/review.yaml

No findings is a real result. A reviewer that has to say something on every pull request trains people to ignore it.

The repository decides

Settings live in .mendcode/review.yaml, and enabled is false by default. The file on the base branch decides the checks, the budget and every other sensitive key; a pull request’s own copy may only add instructions for paths. Otherwise a pull request could turn its own review off.

A file starts from a preset (balanced, quiet, strict, on-request or autofix) and its own keys go over it. The profile decides what gets published:

Profiles

ProfilePublishes
quietCritical and major findings only
normalConfirmed findings (the default)
strictAlso maintainability findings, and plausible ones marked as such

Publishing from your account is a separate consent: /pr publish on|off. GitLab and Gitea/Forgejo work through adapters in the daemon. github install --hosted writes a workflow that reviews each pull request on GitHub’s runners with the repository’s own model, for when no machine is on.

Watching a repository

/pr watch-repo [all|requested] keeps reviewing new pull requests and pushes. It polls gh pr list about once a minute and makes no model call when nothing changed. Watches survive restarts. A pull request waits 10 minutes between reviews and a repository gets at most 20 per hour; the first scan picks up to 10 pull requests from the last 30 days.

A watched repository’s review arriving in the session.

@mendcode commands

Comment on the pull request

  • @mendcode review reviews the whole pull request, even a paused one.
  • @mendcode pause and resume: new pushes are not reviewed until resume.
  • @mendcode explain, as a reply to a finding: a read-only child reads the code and answers, and may say the finding is wrong.
  • @mendcode learn <text> replies with the line for .mendcode/review-learnings.md. It counts once merged on the base branch, so a pull request never teaches the reviewer by itself.
  • @mendcode fix needs fixes: true on the base branch. It edits a throwaway worktree, runs the checks and pushes one commit only if they pass, never with force.