update_repo_settings
The CodePanel MCP tool that sets a repository's auto-review, round limits, merge gate, review switches and who to escalate to.
On this page›
update_repo_settings changes how CodePanel reviews one repository: whether it reviews automatically, how many rounds a pull request gets, which findings hold the CodePanel commit status, which panel it uses, which repository-level review switches apply, and who to ask when no agent can settle a finding. Send only the fields you want to change. It needs the repos:write scope and is the call behind most of a repository's setup.
When to call it
- After
connect_repo, to set the gate and round limit the repository should have. - When agents and reviewers go back and forth on a pull request. Lower
maxAutoRounds, or name people inescalationso a finding goes to someone who can decide it. - When a status doesn't hold a merge it should. That is
gate. Lowering it is a person's step in the dashboard (see Merge protections). - To try a review switch on one repository with
reviewSwitchesbefore the deployment turns it on for everyone.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
repo |
string | yes | Repository as owner/name |
autoReview |
boolean | no | |
maxAutoRounds |
integer, at most 50 or null | no | Automatic review rounds per pull request (1-50), or null for no limit. /review still runs past it. |
botMaxRounds |
integer, at most 50 or null | no | Rounds in all a bot commenting /rounds may extend a pull request to (0-50; 0 stops bots adding rounds), or null for the default of 5. Owners, members and collaborators are not held to it. |
stepBackAfterRounds |
integer, at most 50 or null | no | The round from which the review carries a step-back notice (payload.stepBack) advising to reconsider the approach rather than patch the latest finding (0-50; 0 turns it off), or null for the default of 3. It stops nothing and never changes the gate. |
idleNudgeHours |
integer, at most 23 or null | no | Hours without a push, comment, rating or read after which CodePanel posts one comment naming the pull request's nextAction, when that action is its author's (0-23; 0 turns it off), or null for the default of 6. Once per head commit, at most 10 a day per repository; it changes no status or gate. |
trustedBotAuthors |
array of strings, at most 10 or null | no | GitHub App logins, exact, such as ["my-agent[bot]"], whose pull requests are reviewed automatically and whose /review comments run like a member's; every other bot stays skipped. Their /rounds stays held to botMaxRounds. [] or null trusts none. A token may remove Apps but not add one; a person adds them in the dashboard. |
inlineSuggestions |
boolean | no | Also post critical and warning findings that have a checked patch as inline GitHub suggestion comments. Off by default; the summary comment and get_review are unchanged. |
panelId |
string or null | no | Panel to use, or null for the default |
gate |
off or critical or warning_high or warning or all |
no | Findings that must be fixed or answered before the commit status passes: critical, warning_high (critical, and warnings rated high confidence), warning (critical and warning, the default), all, or off for no status. A token may raise it but not lower it, except that it may set warning_high from warning or all |
agentFiles |
boolean | no | Read AGENTS.md and CLAUDE.md from the base branch as review context (off unless turned on) |
reviewSwitches |
object | no | Review switches for this repository over the deployment's: REVIEW_CACHEABLE_PROMPTS, REVIEW_REVIEWER_TOOLS, REVIEW_PRECISION_RULES, REVIEW_CHANGED_LINES, REVIEW_LEARNING_ATTRIBUTION, REVIEW_BASE_MERGE_SCOPE, REVIEW_PROOF_GRADING, REVIEW_NOVEL_ESCALATION, REVIEW_HOLD_LATER_SUGGESTIONS, REVIEW_CONFIRM_FIXES, REVIEW_PREFIX_DIAGNOSTICS, REVIEW_CURRENT_PRACTICE, REVIEW_ORCHESTRATOR_CACHE, REVIEW_UNREVIEWED_FILES. REVIEW_CACHEABLE_PROMPTS and REVIEW_HOLD_LATER_SUGGESTIONS (rounds after the first hold back new suggestions into the review payload's heldBack) are on by default; the others are off. The response gives each one's deployment, override, effective value and source. |
reviewSwitches.REVIEW_CACHEABLE_PROMPTS |
boolean or null | no | true or false for this repository, null to follow the deployment again |
reviewSwitches.REVIEW_REVIEWER_TOOLS |
boolean or null | no | true or false for this repository, null to follow the deployment again |
reviewSwitches.REVIEW_PRECISION_RULES |
boolean or null | no | true or false for this repository, null to follow the deployment again |
reviewSwitches.REVIEW_CHANGED_LINES |
boolean or null | no | true or false for this repository, null to follow the deployment again |
reviewSwitches.REVIEW_LEARNING_ATTRIBUTION |
boolean or null | no | true or false for this repository, null to follow the deployment again |
reviewSwitches.REVIEW_BASE_MERGE_SCOPE |
boolean or null | no | true or false for this repository, null to follow the deployment again |
reviewSwitches.REVIEW_PROOF_GRADING |
boolean or null | no | true or false for this repository, null to follow the deployment again |
reviewSwitches.REVIEW_NOVEL_ESCALATION |
boolean or null | no | true or false for this repository, null to follow the deployment again |
reviewSwitches.REVIEW_HOLD_LATER_SUGGESTIONS |
boolean or null | no | true or false for this repository, null to follow the deployment again |
reviewSwitches.REVIEW_CONFIRM_FIXES |
boolean or null | no | true or false for this repository, null to follow the deployment again |
reviewSwitches.REVIEW_PREFIX_DIAGNOSTICS |
boolean or null | no | true or false for this repository, null to follow the deployment again |
reviewSwitches.REVIEW_CURRENT_PRACTICE |
boolean or null | no | true or false for this repository, null to follow the deployment again |
reviewSwitches.REVIEW_ORCHESTRATOR_CACHE |
boolean or null | no | true or false for this repository, null to follow the deployment again |
reviewSwitches.REVIEW_UNREVIEWED_FILES |
boolean or null | no | true or false for this repository, null to follow the deployment again |
escalation |
object or null | no | Escalate findings no agent can settle to these people: nextAction becomes escalate, the commit status names them and one PR comment asks them to answer with /feedback. Null clears it; absent leaves it. Off unless set. A token may add contacts but not remove them (403); a person removes them in the dashboard. |
escalation.contacts |
array of strings, at most 5 | yes | 1-5 GitHub logins to ask, @ optional |
escalation.triggers |
array of strings | no | When to ask: upheld_critical (a critical the orchestrator upheld after the author's dispute), round_limit (a critical left at the round limit), step_back (anything gated left while the step-back notice shows), novel (a warning or critical the orchestrator judged a decision for a person; needs REVIEW_NOVEL_ESCALATION on). Absent means upheld_critical and round_limit. |
crossFamilyReview |
object or null | no | Never judge a change only by the model family that wrote it: when the author's family is known, the orchestrator runs on a usable model of another family, with the choice on payload.crossFamily and the review comment. Null clears it; absent leaves it. Off unless set. A token may turn it on but not off (403); a person turns it off in the dashboard. |
crossFamilyReview.enabled |
boolean | yes | |
crossFamilyReview.fullLanePaths |
array of strings, at most 50 | no | Globs over changed files; a pull request that changes one is full lane: its verdict also comes from a frontier model |
crossFamilyReview.fullLaneMarker |
string | no | A phrase or heading in the pull request description that makes it full lane, e.g. "## Whiteboard defense" |
autoFix |
object or null | no | Automatically dispatch a cloud fix agent when a review leaves blocking findings (mode: "blocking", maxAttempts: 1-5) or "off" / null to disable. |
autoFix.mode |
off or blocking |
yes | |
autoFix.maxAttempts |
integer, at most 5 | no | |
convergence |
object | no | Switches that settle a pull request after its gate has passed, each off unless set; true turns one on, false or null off, names left out stay as they are. settleAfterGreen: once a head has passed, a later round's finding holds the merge only if critical or within 5 lines of a line changed since. orchestratorAdvisory: a finding no reviewer reported never holds the merge. disputeLearnings: a candidate learning becomes active once conceded disputes citing it on 3 pull requests. doneWarnsPush: retired and ignored; nextAction done always says to stop pushing. A token may set any of them; settleAfterGreen and orchestratorAdvisory narrow what blocks. |
convergence.settleAfterGreen |
boolean or null | no | |
convergence.orchestratorAdvisory |
boolean or null | no | |
convergence.disputeLearnings |
boolean or null | no | |
convergence.doneWarnsPush |
boolean or null | no | |
autoApproveOnPass |
boolean | no | false stops CodePanel posting an approving GitHub review when the merge gate passes. true is refused with 403: turning it on is a dashboard step, since an approval can satisfy a required review. |
It writes: the server marks it readOnlyHint: false and destructiveHint: true (it can change what is already there), so a client that asks before writes asks here.
A field you leave out stays as it is. A field set to null is cleared back to its default, for the fields that accept null. The call is one write: if any field is refused, none of them is applied.
Merge protections
The tool runs on a token, and a token can tighten what blocks a merge but not loosen it. The agent is the one the gate holds, so lowering the gate is for a person. Each of these is refused with 403 and code: "forbidden":
| Field | Refused from a token | Allowed from a token |
|---|---|---|
gate |
A lower level, such as warning to critical or anything to off |
The same level or a higher one, and warning_high from warning or all |
trustedBotAuthors |
Adding an App | The same list, or one with Apps removed |
escalation |
Removing a contact, including null |
Adding contacts, changing triggers |
crossFamilyReview |
enabled: false or null once it is on |
Turning it on, changing its paths and marker |
autoApproveOnPass |
true |
false |
The refusal names each change it refused, in its message and in fields. Nothing else in the update is applied. Its nextAction is the repository's settings page in the dashboard, where a person signed in in the browser makes the change. Pass that on to the person you work for rather than trying another way.
Rounds
maxAutoRounds: automatic rounds per pull request, 1 to 50.nullremoves the limit. A repository connected through CodePanel starts at 3. The dashboard's Review now still runs past the limit, and a pull request's own/roundssetting replaces it for that pull request (/rounds, Round limits).botMaxRounds: the most rounds in all a bot's/roundscomment may raise a pull request to, 0 to 50.0stops bots adding rounds,nullrestores the default of 5. Owners, members and collaborators are not held to it.trustedBotAuthors: up to 10 GitHub App logins, exact, such as["my-agent[bot]"], whose pull requests are reviewed automatically and whose/reviewcomments run like a member's. Every other bot stays skipped. A listed App's/roundsand/reviewstay held tobotMaxRounds.[]ornulltrusts none. Adding an App reviews its open, skipped pull requests once. Only a person adds an App, in the dashboard; a token can remove one (Merge protections). See Trusted bot authors.stepBackAfterRounds: the round from which the review carries a notice to reconsider the approach.0turns it off,nullrestores the default of 3. It never changes the gate (Step back).idleNudgeHours: hours of silence before CodePanel posts one nudge comment, 0 to 23.0turns it off,nullrestores the default of 6 (Idle nudge).
gate
gate chooses which findings must be fixed or answered before the CodePanel commit status passes:
| Value | Must be answered |
|---|---|
critical |
Critical findings |
warning |
Critical findings, and warnings not rated low confidence. This is what applies when gate is unset |
all |
Every finding, suggestions and low-confidence warnings included |
off |
Nothing. CodePanel stops posting the status |
There is no null: to get the default back, send warning. A token can only raise the level; see Merge protections. A change reposts the status on the repository's 50 most recent pull requests at once. Older ones pick it up at their next review, answer or push. See Gate levels.
reviewSwitches
reviewSwitches is an object of switch names, each true, false or null:
trueorfalsesets the switch for this repository, whatever the deployment has.nullremoves the repository's own value, so the switch follows the deployment again.- A name you leave out is not touched.
Passing reviewSwitches itself as null is not accepted. To clear every switch, send each name as null. A name outside the fourteen the schema lists is refused. When the last repository value is removed, the repository holds no switches at all. The response says what each switch now resolves to; get_review_switches reads it without changing anything.
crossFamilyReview
crossFamilyReview makes a round's verdict come from a model family other than the one that wrote the pull request. It is an object, or null:
{ "crossFamilyReview": { "enabled": true, "fullLanePaths": ["convex/schema.ts", "**/billing/**"], "fullLaneMarker": "## Whiteboard defense" } }
enabledis required.falsekeeps the setting but turns it off.fullLanePathsis optional: up to 50 globs over changed files. A pull request that changes a matching file is full lane, and its verdict also comes from a frontier model.fullLaneMarkerdoes the same for a phrase or heading in the description, in any case.nullclears the setting. Absent leaves it as it is. The object replaces what was stored.- A token can turn it on but not off:
enabled: falseornullon a repository where it is on is refused (Merge protections). - When the author's family is unknown, or no other family has a working key, the round runs as configured and
payload.crossFamilysays why.
escalation
escalation names people CodePanel asks when a finding cannot be settled by the author agent. It is an object, or null:
{ "escalation": { "contacts": ["alice", "bob"], "triggers": ["upheld_critical", "round_limit"] } }
contactsis 1 to 5 GitHub logins. A leading@is dropped, spaces are trimmed and duplicates are removed ignoring case. A value that is not a valid GitHub login is refused with"<value>" is not a GitHub login., and a list outside 1 to 5 withEscalation needs 1 to 5 GitHub logins to ask; clear it with null.triggersis optional. Left out, it meansupheld_critical(a critical the orchestrator upheld after the author disputed it) andround_limit(a critical still unanswered at the round limit).step_backescalates every unanswered gated finding once the step-back notice shows, warnings too.novelescalates what the orchestrator judges a decision for a person, and does nothing unless theREVIEW_NOVEL_ESCALATIONswitch is on. An empty list is refused.nullclears the setting. Absent leaves it as it is.- The object replaces what was stored. Sending only
contactsresetstriggersto the default pair. - A token can add contacts but not remove them: a list missing a stored contact, or
null, is refused (Merge protections).
When a trigger fires, nextAction in get_review becomes escalate and names the findings, the commit status names the contacts, and one pull request comment mentions them. The author agent stops pushing and disputing for those findings until a contact answers. Escalation never changes what counts as an answer, and it does nothing while gate is off. Details are in Escalate to a person.
Other inputs
panelId: pins the repository to one panel.nullreturns it to your default panel. An id that isn't one of your panels is refused withPanel not found.agentFiles: readAGENTS.mdandCLAUDE.mdfrom the base branch as review context. Off unless turned on (Repo context).inlineSuggestions: also post critical and warning findings that have a checked patch as inline GitHub suggestion comments. Off by default.autoApproveOnPass:falsestops CodePanel posting an approving GitHub review when the merge gate passes.trueis refused with 403: it is turned on only in the dashboard, since an approval can satisfy a required review (Auto-approve, Merge protections).autoReview: turns automatic review on or off for the repository without disconnecting it.
Other failures: a repository that is not yours gives Repository not found. A round setting outside its range is refused with a sentence naming the range, for example Automatic rounds per pull request must be a whole number from 1 to 50, or blank for no limit.
What it returns
{ "ok": true, "reviewSwitches": { ... } }. reviewSwitches lists every switch with:
| Field | Meaning |
|---|---|
deployment |
The deployment's value, or the switch's default while the deployment leaves it unset |
override |
This repository's own value, null for none |
effective |
What the repository's next round uses |
source |
repository (the override), deployment or default |
The response does not echo the other settings. Read them back with list_repos.
Examples
These responses come from a test account on a local backend. The deployment values come from that backend's environment, not from the hosted service.
{ "repo": "codepanel-dev/web-app", "maxAutoRounds": 5, "gate": "critical" }
{
"ok": true,
"reviewSwitches": {
"REVIEW_CACHEABLE_PROMPTS": {
"deployment": true,
"override": null,
"effective": true,
"source": "default"
},
"REVIEW_REVIEWER_TOOLS": {
"deployment": false,
"override": null,
"effective": false,
"source": "default"
}
}
}
The call set two fields and touched no switch, so every switch still reports override: null. Setting "reviewSwitches": { "REVIEW_REVIEWER_TOOLS": true } would turn that entry's override to true and its source to repository.
The same step without MCP
| Surface | Form |
|---|---|
| CLI | codepanel repos set <owner/name> --max-auto-rounds 5 --gate critical, with --escalate-to, --escalate-on and --switches NAME=on|off|default for the rest (CLI) |
| HTTP API | POST /repos/settings with the same fields |
| Pull request comment | /rounds sets one pull request's limit, not the repository's (syntax) |
What the server tells your agent
The description your agent reads when it lists the tools:
Turn automatic review on or off for a repository, cap its automatic review rounds per pull request, set how far bots may extend them, name GitHub Apps whose pull requests and /review comments count like a member's (trustedBotAuthors), set the round from which reviews advise stepping back (stepBackAfterRounds, 0 off), set how long a pull request waits on its author before one nudge comment (idleNudgeHours, 0 off), pin it to a specific panel (null for the default), post inline suggestion comments on the diff (inlineSuggestions), choose which findings must be answered before its CodePanel commit status passes (gate), choose whether reviews read its AGENTS.md and CLAUDE.md, set its own review switches (reviewSwitches), name people to ask about findings no agent can settle (escalation), have a model family other than the author's carry the verdict (crossFamilyReview), or turn off approving GitHub reviews when the merge gate passes (autoApproveOnPass: false). A token may tighten merge protections but not loosen them: lowering gate, adding to trustedBotAuthors, removing escalation contacts, turning crossFamilyReview off and turning autoApproveOnPass on are refused with 403, nothing in the update applied, and nextAction names the dashboard page where a person makes the change.
Related
get_review_switches: read the switches without changing them.list_repos: read the settings back.set_review_rounds: raise or lower one pull request's limit.- Merge gate: the gate levels and escalation in full.
- Round limits: how rounds are counted.
- MCP server: where this fits in setup.