All posts

Reviewer reads the code your diff breaks, not just the diff

Most bugs that reach production pass review because the reviewer only saw the change. Reviewer, Cowork's ready-made coworker for pull requests, reads the callers the change reaches before it writes a word. On a 24-case eval it found the broken caller in every cross-file run, against none without it, and left every correct change alone. Here is how it works, why a pull request cannot steer it, and how we know.

At a glance

  • Reviewer is a Cowork coworker that reviews every pull request touching the paths you name in each repository. It runs on mux with no Mac, on the model mux includes with Pro and Pro+.
  • Before a review, mux's own code asks the workspace's code index where the change is called and where importing files use what it exports, and shows Reviewer each of those lines with the code around it.
  • On the eval, Reviewer named the broken caller in 24 of 24 cross-file runs, against 0 of 24 with the diff alone. Since 7 November it also catches a change to a table or a constant, 40 of 40 in the second round.
  • A pull request cannot steer it. Each review runs alone with no tools, on material mux's code gathered, and code reads a verdict that has no approve.

A pull request changes findSession so that it returns null for an expired session instead of throwing. The diff is three lines and reads as an improvement. The tests in the changed file pass. A reviewer approves it.

Two folders away, middleware.js reads a property of what findSession returns. After the merge, every expired session is a 500 instead of a 401. Nothing in the diff showed it, because the bug is not in the diff. It is in the code the diff reaches.

src/sessions.js the diff, the only file the pull request changes
19 export async function findSession(token) {
20 const key = hashToken(token);
21 const session = sessions.get(key);
22 if (!session || session.expiresAt <= Date.now()) {
23 sessions.delete(key);
-24 throw new SessionNotFoundError();
+24 return null;
25 }
26 return session;

Reads as an improvement: no exception for a routine case. The tests in this file pass.

src/middleware.js not in the diff, two folders away
10 try {
11> const session = await findSession(token);
12 req.user = { id: session.userId, scopes: session.scopes };
13 if (requiredScope && !req.user.scopes.includes(requiredScope)) {
14 return res.status(403).json({ error: 'missing scope ' + requiredScope });
15 }
16 return next();
17 } catch (err) {
18 if (err instanceof SessionNotFoundError) {
19 return res.status(401).json({ error: 'session expired' });

Line 12 reads a property of null. The catch on line 18 waited for an error that no longer comes, so every expired session is a 500, not a 401.

Reviewer's summary of this change, in the eval (round 2, run 3) "findSession now returns null, but src/middleware.js:12 dereferences it, so every expired or unknown token yields a 500 instead of a 401. Update that caller (and its now-dead catch branch) before merging."
The bug is on the right, and the pull request only touches the left. A reviewer who reads the diff sees an improvement. Reviewer is shown line 11 as a call to the changed function, with the lines around it, and names line 12.

That is the bug a reviewer who only sees the change cannot catch. A person catches it by remembering the codebase. Reviewer catches it by looking.

What Reviewer is

Reviewer is a ready-made coworker in Cowork. You name the paths it watches for each repository, such as src/payments/**. Every new commit of every open pull request that touches them gets one review: what can break and how, how likely it is, the fix, and a test that would catch it, each pointed at path:line.

  • It runs on mux, not on your Mac. It keeps reviewing with muxcode closed, on DeepSeek V4.1 Flash, the model mux includes with Pro and Pro+.
  • It never approves. It requests changes when the change must not merge as it is, or the risk is high, and comments otherwise. An approval stays a person’s to give.
  • Its first reviews are drafts. You read them in its Activity and turn on posting when you trust them. It then posts as the mux GitHub App.

How it sees the caller

Before a review runs, mux’s own code, not the model, gathers the repository around the change. The model is handed the result and nothing else.

  1. The change GitHub
    • the pull request and its body
    • each watched file: its diff, and its full text at the head, numbered
  2. What it edits read by code
    • names declared or edited on changed lines
    • the function each edit sits in, from the file itself
  3. Ask the index calls and importers
    • calls to each name, outside the changed files
    • member calls too: quota.limitFor(…)
    • files that import a changed file, and the lines that hold what they import
    • a hit that may not be a call goes on a list to read
  4. Read the base branch the lines around each
    • 2 lines before and 4 after each call
    • from the function's opening line, when it is 10 lines up or less
    • REVIEW.md, and the workspace's notes on the repository
  5. The review one conversation, no tools
    • everything above, quoted as material
    • what breaks, how likely, the fix, a test, each at path:line
the index does not answer Reviewer waits for it, then says in the review that it could not look for callers, never that there are none.
Code decides what the model reads. The parts marked new shipped on 7 November. Importer lines are what let a change with no edited function, a table or a constant, reach its caller.
  1. It reads the change. That means the pull request, the diff of each watched file, and each file in full at the head, with line numbers.
  2. It finds the names the change edits. It reads them from the patch and from the file at the head, since git’s hunk header can name the wrong function.
  3. It asks the workspace’s code index two things. Where those names are called outside the files the pull request changes, as plain calls and as member calls. And which files import the changed ones, with the lines in them that hold what they import. A change to a table edits no function, so the second question is the one that finds its caller. A hit that may not be a call, such as a method of the same name, goes on a separate list the review is told to read rather than trust.
  4. It reads each of those files from the base branch and quotes each line with the lines around it: two before and four after, or from the opening line of the function it sits in when that is ten lines up or less. The line that breaks is usually the one after the call, and the line that proves it is often above.
  5. It adds the repository’s REVIEW.md from the base branch, and the workspace’s memory notes kept under that repository’s own folder.

When the index is asleep or down, Reviewer waits for it. If it still does not answer, the review says it could not look for callers, never that there are none.

Why a pull request cannot talk its way through

Whoever opens a pull request writes its title, description and code, and could write them to steer a reviewer. Reviewer is built so that this is the only thing they control.

the author controls
titledescriptioncodecomments in the code

Quoted to the model as material, never as an instruction. It cannot pick what else is read.

mux's code gathers, before the model runs
the diff and filesthe code indexthe base branch's linesREVIEW.mdnotes on the repository

Then the model writes one review, in a conversation of its own with no tools, so a crafted pull request cannot make it read anything else.

code reads the verdict
REQUEST_CHANGES it blocks, or the risk is high
COMMENT everything else
APPROVE does not exist

Read from fixed last lines: RISK, BLOCKING, SUMMARY. Anything else there is no verdict, and nothing is posted.

The worst a pull request can do is argue in its own text. In the eval, with the code index, every run on a pull request that told Reviewer to approve blocked it anyway: 21 of 21.

The author writes text, and text is all it stays. What the model reads is chosen by code before it starts, and what gets posted is chosen by code after it ends, from two outcomes neither of which is an approval.
  • Each review runs in a conversation of its own. It never sees your chats with Reviewer, its emails or webhooks, or the last pull request.
  • A review calls no tools. What it sees was gathered by mux’s code before it started, so a crafted pull request cannot make it read anything else.
  • The verdict is read by code, from fixed last lines, and there is no approval for any text to ask for.

How we know

We measure Reviewer with an eval: small repositories with a pull request each, the right answer written down, Reviewer’s own shipped code building every prompt, a code grader reading each answer as production does, and a pass rate with an error bar for every kind of case. Every change to Reviewer runs through it before it ships.

A bug only a caller in another file shows: the caller named

The diff alone round 1, 6 November 0 of 24
With the code index round 1, 6 November 24 of 24
With the index's own code round 2, 7 November 24 of 24
Today after the 7 November fixes 24 of 24

A change to a table or a constant only: the caller named

Calls alone, as on 6 November round 1's simulated index 0 of 40
With importer lines round 2, 7 November 40 of 40
Today one run gave no verdict 39 of 40
The index is the difference, and the importer lines extend it. The same model given only the diff named the caller in none of the cross-file runs. On 6 November it often blocked anyway, on a guess it could not point at; since calibration it comments and asks for the caller.

The first round, on 6 November, also found three things wrong with Reviewer as first built: it blocked correct changes on worries it could not confirm, the fix for that made it too quiet on callers it saw as one line, and it sometimes looked up the wrong function. All three are fixed. The second round, on 7 November, replaced the simulated index with the index’s own code, added 30 cases, and checked what Reviewer says with the index down: in 96 of 96 runs it said so, and none claimed a change had no callers. How we measure Reviewer before we change it has the method, every number with its interval, and each miss.

What the numbers do not say

Try it

Reviewer comes with muxcode 1.0.23 and mux on Pro and Pro+. Open Cowork, choose Code review, tick your repositories and name the paths you care about most in each. Reviewer offers the repositories in your workspace’s code index, which is also how it sees the callers. The Reviewer guide covers the rest.

The working where each number comes from
  • The findSession example and Reviewer’s summary: the eval case xf-find-session-returns-null in helios docs/benchmarks/2026-11-07-reviewer-evals/cases-round-1.json, and its third real-index answer in runs/all-answers.jsonl, 7 November 2026.
  • What mux’s code gathers, the 2-before and 4-after window, the 10-line reach, member calls and the list to read: codeContext and reviewPrompt in helios apps/sandbox/src/coworker/reviewer.ts on main at 67c05ea1 (helios #326 and #330), 7 November 2026.
  • No approval, the verdict lines: ReviewEvent, readVerdict and eventFor in the same file.
  • 0 of 24 and 24 of 24, round 1; the three fixes: helios docs/benchmarks/2026-11-06-helios-evals/ (v1 diff, v4 index), 6 November 2026.
  • 24 of 24, 40 of 40, 0 of 40, 96 of 96, 54 cases: helios docs/benchmarks/2026-11-07-reviewer-evals/runs/v5-report.md, r2-report.md and all-report.md, 7 November 2026.
  • Today, 24 of 24 and 39 of 40: the v10 column of the same directory’s README, the code on main at 67c05ea1.
  • 21 of 21 pull requests told to approve, blocked: with the code index, round 1’s injection runs (6 of 6 blocked, v4; one named the wrong line) and round 2’s importer-injection runs (15 of 15). Without the index, a steering comment in the caller is never shown, so it cannot steer.
  • muxcode 1.0.23: its release notes, 4 November 2026.