Autoreview

After each build turn, an independent reviewer checks the change, and hob repairs what holds up, until a stop rule ends the cycle.

Autoreview adds a review-and-repair cycle after each successful build-mode turn. A separate reviewer, with a fresh context, reads the change. hob repairs the findings that hold up, and the reviewer checks again. The cycle goes on until a stop rule ends it.

Autoreview is off by default. It works in the TUI, in print mode (hob -p), in SDK mode, and in ACP.

Quick start

  1. Run /autoreview on in the TUI, or start hob with hob --autoreview.
  2. Ask hob for a change as usual, with a clear objective and scope.
  3. Let the change, the review, and the repairs finish. Read the summary of the cycle before you accept the changes.

Autoreview reviews the files that the session changed since you turned it on, or since the last clean review. Changes made before that, or outside the session, are not in its scope.

Autoreview needs the file history (agent.file_history, on by default). With the file history off, autoreview stays off and hob says why.

Commands

Command What it does
/autoreview Turns autoreview on or off for this session.
/autoreview on Turns autoreview on. The scope starts here.
/autoreview on <level> Turns autoreview on and sets the review level of the session.
/autoreview off Turns autoreview off and stops a review that runs.
/autoreview status Shows the setting, the level, the current step, and the files in scope of each level.
/autoreview run Reviews the scope now, at the level of the session.
/autoreview run <level> Reviews the scope now, as one cycle at <level>.

<level> is base or full. The commands change only the current session. /autoreview off does not stop a turn that already runs: press Esc for that.

To start every session with autoreview on, set autoreview = true in your config:

~/.config/hob/init.lua
hob.setup({
  agent = {
    autoreview = true,
  },
})

hob --autoreview does the same for one launch. hob --autoreview=full also sets the level.

A cycle, step by step

  1. Build. hob finishes a successful turn in build mode. A failed, cancelled, or plan-mode turn starts no review.
  2. Check. If autoreview_checks lists commands, hob runs them, in order. A failure goes back to the agent as a repair turn. No reviewer starts until every check passes.
  3. Review. A separate reviewer starts with a fresh context. It gets the project instructions, your requests, and the plan, if the session has one. It does not get the agent’s own summary. It reads the diff of each file in scope and the code around it, and reports findings.
  4. Repair. For each open blocking finding, hob sends the agent a repair prompt. The agent checks each finding, repairs the real ones, and gives a reason for each one that it rejects.
  5. Review again. The checks run again. The same reviewer reads the repairs and marks each finding as resolved, withdrawn, or still open.

The steps run one after another, never at the same time.

While autoreview is on, the input box shows an AUTOREVIEW tag. During a cycle the tag names the step: waiting, checking, reviewing, or fixing.

Review levels

Level The reviewer looks for What blocks a clean end
base Correctness, and completeness against your requests. blocker and major defects.
full The same, plus refactoring and improvement of the changes. The same, plus major improvements.

base is the default. autoreview_level sets the level of a new session. A minor finding never blocks.

A common flow: run the session at base, so that each turn gets a review for correctness. When the work is done, run /autoreview run full once, to review all of it for refactoring and improvement.

Findings

Each finding has an id (F1, F2), a kind, a severity, a path, a line, a title, and the evidence in the code.

Kind Meaning Severities
defect The change gives a wrong result, or does not do what you asked. blocker, major, minor
improvement The change is correct, and a concrete change makes it simpler, clearer, or cheaper. major, minor

A blocker or major defect must name the input or state that goes wrong. hob rejects a report that breaks the rules.

Checks

autoreview_checks is a list of shell commands that must pass, in order:

~/.config/hob/init.lua
hob.setup({
  agent = {
    autoreview_checks = { "just check", "just lint" },
  },
})
  • The default is an empty list. Then no check runs, and the cycle is review and repairs only.
  • hob runs the commands itself, not the agent. A check that passes costs no tokens.
  • The checks run before the first review and after each repair turn. The first command that fails stops the list.
  • A failure starts a repair turn with the command, the exit status, and the last 80 lines of output.
  • A command that runs longer than autoreview_check_timeout_secs (default 600) stops and counts as a failure.
  • A project can set its own list in .hob/init.lua. hob loads that file only in a trusted folder.

A check must not write source files. The review does not cover what a check changes.

How a cycle ends

The cycle ends at the first stop rule that applies:

Stop When
Clean The checks pass, the review covers the whole scope, and no blocking finding is open.
Disputed A blocking finding is still open after two repair turns.
Limit The cycle gets to autoreview_max_rounds reviewer runs (default 10), or spends autoreview_max_cost dollars.
Check The same check fails after three repair turns in a row, or a check fails after ten repair turns in the cycle.
Paused The review is partial, the files changed during the review, a reviewer or a repair fails, or plan mode blocks a repair.
Cancelled You press Esc, run /autoreview off, or send new input during a review.

A clean cycle ends with a summary. Its first line says how the cycle ended. It lists the level, the rounds, the findings that hob repaired, withdrew, or left open, the cost, each round, and the checks. For example, with the middle lines left out:

Autoreview complete: no blocking finding is open.
Cycle totals (all rounds):
Level: base.
Rounds: 2.
Findings: 1 repaired (1 major), 1 withdrawn (1 major), 0 open.
…
Checks: passed.

A cycle that stops with a blocking finding open, or with a failing check, ends with a block of open findings, shown as a warning. It starts with a line such as AUTOREVIEW IS NOT CLEAN: 2 blocking findings are open. and ends with the command that reviews the same changes again.

A pause does not turn autoreview off, and does not roll back changes. Read the notice, look at the changes, then give a new instruction, or run /autoreview run to review the same scope again.

Models and cost

The reviewer uses the model and the thinking settings of the run. Two settings set it apart:

  • autoreview_model: the reviewer model, as a full spec such as anthropic/claude-sonnet-4-6.
  • autoreview_effort: the thinking effort of the reviewer, from minimal to max.

Review rounds and repair turns are more model requests. Their tokens and cost count in the run, and the status bar shows them. autoreview_max_cost sets a cost limit for one cycle, in US dollars. A model with no price, or one that a subscription covers, never gets to the limit.

Settings

All settings go in the agent table of hob.setup().

Setting Default What it does
autoreview false Starts each session with autoreview on.
autoreview_level "base" The review level of a new session.
autoreview_checks {} Shell commands that must pass, in order.
autoreview_check_timeout_secs 600 The time limit of one check, in seconds.
autoreview_max_rounds 10 Reviewer runs in one cycle.
autoreview_max_cost none The cost limit of one cycle, in US dollars.
autoreview_model the run’s model The reviewer model.
autoreview_effort the run’s effort The thinking effort of the reviewer.
autoreview_background_wait_secs 60 How long a turn waits for background work before the review is deferred.

Without the TUI

Autoreview runs the same cycle in hob -p, in SDK mode, and in hob acp. Turn it on with the config or the flag:

Terminal
hob -p --autoreview=full "fix the parser"

While autoreview is on, hob -p exits with status 3 when the last review is not clean. A script or a CI job can fail on that status without reading the output. SDK mode exits with 0, and the result of each turn holds the outcome of its review. See Headless mode.

Limits

The reviewer can only read: it has read, index, grep, glob, list, and a tool that shows the changes. It has no shell, and it cannot edit files. The repairs are real edits by the agent, under the normal permissions.

Autoreview does not replace tests, a security review, or a human review. With no check configured, no test ran. Check the final diff and the results of your checks before you commit or ship.

Keyboard shortcuts

Go to

On this page

  • jkNext or previous section
  • 12…The section with that number
  • cCopy the install command
  • iDownload
  • dDocs
  • []Previous or next page

Anywhere

  • ?Show or hide this list
  • EscClose, or stop a "g"