Review switches
The optional review behaviours a repository can turn on or off for itself: what each switch does, its default, and how to set it from MCP, the CLI or the API.
On this page›
Review switches turn optional parts of a review round on or off for one repository. Each has a default that applies to every repository; a repository's own setting overrides it, and setting a switch back to default follows the default again. A round reads every switch once, when it starts, so a change applies from the next round.
The switches
| Switch | Default | What it does when on |
|---|---|---|
REVIEW_CACHEABLE_PROMPTS |
On | Lays out each reviewer's prompt with the material every reviewer shares (rules, pull request, code and diff) first and its role after it, so reviewers on the same provider, model and effort can read one prompt cache entry. It lowers what reviewers cost on providers that cache prompts. Off, each reviewer's role comes first |
REVIEW_HOLD_LATER_SUGGESTIONS |
On | After a pull request's first reviewed round, a newly found suggestion is stored but not posted, so it never asks for a push. Round 1 posts every finding. See Suggestions after round 1 |
REVIEW_REVIEWER_TOOLS |
Off | Gives reviewers read_file and search_code at the head commit, to check the change against callers and definitions outside the diff. Each tool turn is another call to that reviewer's model. Only on your own provider key, with a model that takes tool calls. See Reviewer tools |
REVIEW_PRECISION_RULES |
Off | Gives the orchestrator rules for the kinds of finding coding agents most often disproved: a cost concern about a read that a named limit already bounds, a migration concern about a table the diff itself adds, a warning whose trigger no caller can produce, a complaint that a change described as deliberate changed something, a wording preference, and a hedged claim about code nobody was shown. The rules never drop or lower a critical or security finding |
REVIEW_CHANGED_LINES |
Off | Marks a finding far from every changed line as pre-existing, and lowers it to a suggestion if it was a warning or critical. A critical that is about security stays critical. It is never dropped, since a change can break code it does not touch |
REVIEW_LEARNING_ATTRIBUTION |
Off | Has the orchestrator name the learning behind each finding it drops or demotes. The review says so ("L4 dropped 2 findings") and each learning shows its hits. See Learnings |
REVIEW_BASE_MERGE_SCOPE |
Off | On a push that only merges the base branch, carries the last status over when the pull request's own diff did not change, and otherwise reviews only the conflict resolution. See Base merges, including the risk it accepts |
REVIEW_PROOF_GRADING |
Off | Lowers a warning to a suggestion when the author's proof names a test of that file, the change adds to the test, and every check on the head commit passed. See Proof |
REVIEW_NOVEL_ESCALATION |
Off | Adds the novel trigger to escalation: a warning or critical the orchestrator judges a decision for a person (a security boundary, data loss, a product or pricing call, an irreversible migration) is handed to the repository's escalation contacts. It needs escalation set up |
REVIEW_PREFIX_DIAGNOSTICS |
Off | Records, on each reviewer and orchestrator call's cost record, keyed SHA-256 fingerprints of the part of the request a provider's prompt cache could reuse, and whether the provider reported reading from its cache. No prompt text is stored. It changes nothing the models read, what is sent, or what a round costs; it is how CodePanel measures cache reuse before changing a prompt's layout |
REVIEW_CURRENT_PRACTICE |
Off | Reads the manifests at the head commit (package.json, pyproject.toml, requirements.txt, go.mod, Cargo.toml) and shows every model the packages the changed files import, with the version each manifest declares. Reviewers may then suggest the practice current for that version where the change departs from it. See Current practice |
REVIEW_UNREVIEWED_FILES |
Off | Tells every reviewer and the orchestrator which changed files the round left out, and why (a lockfile, a generated file, a file too large, a file with no diff such as a rename with no content change), with a rule to make no claim that those files are missing or about what they hold. Turn it on if a review calls a file missing that its own comment lists as not reviewed. Up to 50 files are named and the rest counted. Whatever this is set to, a dispute of such a finding is judged with the list in hand |
REVIEW_ORCHESTRATOR_CACHE |
Off | Puts the orchestrator's instructions, which are the same in every round, before the round's pull request, code and reviews, and marks that shared part for the provider's prompt cache (a cache breakpoint on Anthropic, a routing key on OpenAI). The orchestrator reads the same words in a different order. A round's credit hold allows for the provider's cache-write price, so it can be a little larger, never smaller. Whether it lowers cost is not yet measured |
REVIEW_CONFIRM_FIXES |
Off | Past a pull request's automatic round limit, one model call reads each fix an agent rated fixed on a gated finding below critical, and the rating stops counting when the fix is not confirmed. See Fix check past the round limit |
Any other name is refused. Settings that are not switches, such as the merge gate level, inline suggestions and reading AGENTS.md, are repository settings of their own (POST /repos/settings).
Read them
Each command lists every switch with the value the repository's next round uses, its own setting (if any), and where the value comes from: repository for its own setting, default for the built-in default, or deployment when CodePanel's environment sets the switch and no repository setting overrides it.
codepanel repos switches owner/name
get_review_switches { "repo": "owner/name" }
curl -sS -H "Authorization: Bearer $CODEPANEL_TOKEN" \
"$CODEPANEL_URL/api/v1/repos/switches?repo=owner/name"
Set them
Setting a switch needs a token with the repos:write scope. on (true) and off (false) set the repository's own value; default (null) removes it. Switches you leave out stay as they are.
codepanel repos set owner/name --switches REVIEW_REVIEWER_TOOLS=on,REVIEW_HOLD_LATER_SUGGESTIONS=default
update_repo_settings { "repo": "owner/name", "reviewSwitches": { "REVIEW_REVIEWER_TOOLS": true, "REVIEW_HOLD_LATER_SUGGESTIONS": null } }
curl -sS -X POST -H "Authorization: Bearer $CODEPANEL_TOKEN" \
-H "content-type: application/json" \
-d '{"repo":"owner/name","reviewSwitches":{"REVIEW_REVIEWER_TOOLS":true,"REVIEW_HOLD_LATER_SUGGESTIONS":null}}' \
"$CODEPANEL_URL/api/v1/repos/settings"
The response lists every switch in the same shape as reading them. Each round records the switches it ran with, so a review's pipeline stamp says which were on. The per-tool pages for get_review_switches and update_repo_settings show full responses.
Current practice
With REVIEW_CURRENT_PRACTICE on, a round lists the frameworks and libraries the pull request uses. A package is listed when a changed file imports it, or when the pull request adds or changes its line in a manifest. The version is the one the nearest manifest above the file declares, so a workspace package's own version wins over the root's. Up to 8 manifests are read and up to 30 packages listed.
A finding of this kind has a fixed shape, so an agent can tell it from a defect:
Current practice (react ^19.1.0): forwardRef is no longer needed; pass ref as a prop. Verified in src/components/ui/input.tsx.
- It opens with
Current practice (<package> <version>):, naming a listed package and its declared version. - It ends with its grounding:
Verified in <file>.when the reviewer saw the practice in the repository's own files or context, orFrom memory: check against the <package> <version> docs.at low confidence when it did not. Advice from a model's memory is never stated as fact. - It is always a suggestion. CodePanel lowers a warning or critical of this shape to a suggestion, so it never blocks a merge at the default gate. A defect that happens to involve a library is reported as an ordinary finding, without this opening.
- One that names a package the round did not list, or that does not end with its grounding, is dropped, and a round publishes at most 3.
Limits to know before turning it on:
- The version is the declared range, such as
^19.1.0. Lockfiles are not read, so the exact installed version is not known. - A large file that a round shows only in part is read from its diff, so a package imported outside the changed regions is not listed.
- JavaScript and TypeScript, Python, Go and Rust manifests are read. Other ecosystems list nothing, and with nothing listed no finding of this kind is published.
- CodePanel does not fetch a library's documentation. A reviewer checks a practice against the code it was shown (and the repository, with
REVIEW_REVIEWER_TOOLS), or marks it as from memory. - After the first round, suggestions are held while
REVIEW_HOLD_LATER_SUGGESTIONSis on, and these are suggestions.
It is off by default because its effect on false findings has not been measured. Rate these findings like any other: a down rating with a reason is the evidence that decides the default.
codepanel repos set owner/name --switches REVIEW_CURRENT_PRACTICE=on