Skip to article

HTTP API

Read findings, runs, queue status and graph queries over Merget's HTTP API.

On this page

The HTTP API returns the same documents as the MCP server, for your own scripts and tools. Every route on this page reads. To change settings or act on the merge queue, an agent uses the MCP server's operating tools, with the permissions you gave it. For sign-in, permissions and access controls, see Connect coding agents. Use of the API is governed by the API and Agent Terms.

Base URL

The API lives at the same address as your Merget dashboard, under /v1. The examples on this page use $MERGET_URL for that address:

Terminal
export MERGET_URL="<your Merget dashboard address>"

Repositories are addressed by their GitHub name: /v1/repos/{owner}/{name}, for example /v1/repos/acme/payments. Owner and name may contain letters, digits, -, _ and ..

Authentication

Send a bearer token with every request:

Text
Authorization: Bearer <token>

A token comes from signing in to Merget in your browser, the way MCP clients do. A script or tool of your own signs in with OAuth 2.1, like any other client of Merget's sign-in service; most OAuth libraries take these steps for you:

  1. It reads $MERGET_URL/.well-known/oauth-protected-resource, which names Merget's sign-in service and the scopes this API accepts.

  2. It registers with that service, or identifies itself with a published identity, and opens Merget's sign-in page in your browser with an authorization code request (PKCE).

  3. You sign in, check the consent page, choose the permissions and the organization, and select Approve. See Sign in and consent.

  4. It exchanges the code for an access token, and for a refresh token when it asked for offline_access.

Access tokens last one hour; see Token lifetime and refresh. Each route needs a scope, listed below; a token without it gets 403 insufficient_scope. The organization switch, the organization's permissions and the repository's agent access level also apply. See Permissions and Control agent access. A token reads only the repositories its person can see: public ones, and private ones their GitHub account can read. See Which repositories you see.

Terminal
export TOKEN="<access token>"
curl -H "Authorization: Bearer $TOKEN" "$MERGET_URL/v1/repos/acme/payments"

There are no API keys or service accounts today.

A sequence diagram shows a client sending an authenticated GET to the pull-request findings route, then receiving versioned findings and interpretation. Queue details require a separate scope.

Illustration: route and field names are API vocabulary; the bearer token is a placeholder, not a credential.

What to look for
  • Use the dashboard’s address as the API base and send Authorization: Bearer with a valid token.
  • The findings route requires the findings read scope. Queue information also requires the queue read scope and an available queue plan.
  • Inspect the response’s run and pull request head alongside the verdict and findings. This findings request and graph queries are read-only. Other API actions can make changes with the required permissions.

Versioning

Every JSON document the API returns, apart from error bodies, has "api_version": "2026-09", and every response from the routes listed under Routes carries the same value in the Merget-Api-Version header. The version names the shape of the documents. Build clients that ignore fields they do not know. A list of values, such as the verdict's status or a run's outcome, can also gain a value within a version: treat a status you do not know as not clean, and an outcome you do not know as a finished run to open.

In October 2026 Merget renamed, within version 2026-09, the MCP tools (every tool id now starts with merget_), the MCP server's name and the _meta keys of its results (merget.api_version, merget.scope and merget.error), and the count fields in a run's report and in the runs the operating tools return. The earlier names are no longer served. The documents described on this page kept every field.

Routes

All routes are relative to $MERGET_URL.

MethodPathScopeReturns
GET/v1/repos/{owner}/{name}merget:findings.readA repository summary.
GET/v1/repos/{owner}/{name}/pulls/{number}/findingsmerget:findings.readThe findings document of the pull request's latest finished run, in JSON or Markdown.
GET/v1/repos/{owner}/{name}/pulls/{number}/runsmerget:findings.readThe pull request's runs, newest first.
GET/v1/repos/{owner}/{name}/runs/{id}/findingsmerget:findings.readThe findings document of one run, in JSON or Markdown.
GET/v1/repos/{owner}/{name}/commits/{sha}/runsmerget:findings.readThe runs whose head is that commit.
GET/v1/repos/{owner}/{name}/pulls/{number}/queuemerget:queue.readThe pull request's queue position and enforcement.
GET/v1/repos/{owner}/{name}/queuemerget:queue.readThe repository's queue.
POST/v1/repos/{owner}/{name}/graph/{tool}merget:graph.readThe answer to one graph query.

Path parameters:

  • {number} is a pull request number, 1 or greater.

  • {id} is a run id, as listed in a runs document or shown on the run's page in the dashboard.

  • {sha} is a commit sha of 7 to 40 hex characters.

Findings parameters

The two findings routes accept these query parameters:

ParameterValuesEffect
formatjson (default), markdown or mdThe response format.
runa run idPull request route only: read that run instead of the latest finished run.
includereportInclude the run report in the JSON response when available.

Without format, an Accept: text/markdown header also selects Markdown; format wins when both are given. Markdown is served as text/markdown; charset=utf-8. The Markdown rendering has the same sections as the JSON (verdict, pull request, run, findings, brief, queue, interpretation and links) and is identical for identical data.

Terminal
curl -H "Authorization: Bearer $TOKEN" \
  "$MERGET_URL/v1/repos/acme/payments/pulls/241/findings"

curl -H "Authorization: Bearer $TOKEN" -H "Accept: text/markdown" \
  "$MERGET_URL/v1/repos/acme/payments/pulls/241/findings"

curl -H "Authorization: Bearer $TOKEN" \
  "$MERGET_URL/v1/repos/acme/payments/pulls/241/runs"

curl -H "Authorization: Bearer $TOKEN" \
  "$MERGET_URL/v1/repos/acme/payments/pulls/241/queue"

Dismissing a finding

A token with merget:queue.write can dismiss a finding the way a person does in the dashboard, and undo it. See Dismissing a finding for what a dismissal does. Your permission on the repository in GitHub is checked at the time of the request and must be at least Write. It works in every mode.

MethodPathBodyReturns
POST/v1/orgs/{org}/repos/{repo_id}/pulls/{number}/findings/{fingerprint}/dismissal{"reason": "…"}, required, at most 500 characters, with no control characters other than tabs and line breaksdismissed, fingerprint, by (your GitHub login), reason, changed (false when the same dismissal already stood) and rerun (requested, job_id)
DELETEthe same pathnoneundismissed (false when it was not dismissed), fingerprint and rerun

{org} is the organization's slug and {repo_id} the repository's numeric id (org and repo.id in its repository summary), and {fingerprint} the finding's fingerprint from the findings document. Each change asks Merget to run the pull request again, so its check and counts follow; a run already in progress is stopped first. rerun.requested is false when no run was asked for: the pull request is closed, or, in Queue and Autonomous mode, the queue does not hold it (a draft, or one without the queue's label), and the dismissal takes effect on its next run. Agents connected through MCP use merget_queue_action with dismiss or undismiss instead. See MCP.

Terminal
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"reason": "get_plan is defined in src/plan.rs, outside the changed files"}' \
  "$MERGET_URL/v1/orgs/acme/repos/11/pulls/241/findings/13592653589793238462/dismissal"

Submitting a fix to a failed batch

A token with merget:queue.write can hand Merget a fix for a batch whose CI failed, instead of pushing the pull request's branch, the way a person does from the batch's details. See Submit a fix to Merget for what Merget does with it. Your permission on the repository in GitHub is checked at the time of the request and must be at least Write. It works in Queue and Autonomous mode, while the repository's Accept fixes and conflict resolutions submitted to Merget setting is on, and only where GitHub requires the Merget check on the target branch.

MethodPathBodyReturns
POST/v1/orgs/{org}/repos/{repo_id}/queue/batches/{batch}/amendments{"base_commit": "…", "patch": "…", "reason": "…", "number": 412}; number is optionalsubmitted, amendment and job_id; submitted is false and already true when the same fix already stood
DELETE/v1/orgs/{org}/repos/{repo_id}/queue/amendments/{id}nonewithdrawn (false, with already true, when it was withdrawn before), amendment and rerun (requested, job_id)
GETthe same pathnoneThe fix with its diff in patch, null once Merget no longer keeps it. Needs merget:queue.read.

{org} and {repo_id} are as for dismissing a finding. {batch} is the batch's id or its b-xxxxxxxx name. base_commit is the full 40-character sha of a commit the batch tested: the batch's commit, or the commit where one of its pull requests entered it. patch is the unified diff against that commit (git diff --cached --no-color --no-ext-diff --no-textconv --no-renames --src-prefix=a/ --dst-prefix=b/ <base_commit>), text only, at most 1 MiB, changing nothing under .github/ or .opencode/, no CODEOWNERS, .gitattributes or .gitmodules file and no root opencode.json or opencode.jsonc. reason is required, at most 500 characters, with no control characters other than tabs and line breaks, and is shown on the pull request. number picks the pull request the fix lands with; without it Merget picks one.

amendment carries id, batch_id, batch (its b-xxxxxxxx name), number, number_source (explicit, paths or last_member: how the pull request was chosen), head_sha, base_commit, paths, patch_bytes, by (the submitter's GitHub login), via (person, or agent for an agent token), reason, status (proposed, certifying, accepted, retest_failed, refused, landed, published, dropped or withdrawn), refusal, run_id, retest_batch_id, settled_commit, superseded_by, created_at and updated_at. One fix stands per pull request at a time. Agents connected through MCP use merget_queue_action with amend or withdraw_amendment instead. See MCP.

Each batch the queue serves (in the plan's batches, the batch list and one batch) carries amendments, the fixes submitted for it or carried by one of its pull requests, newest first, each as above with relation (submitted or carried), and amendable: null while the repository offers no fixes (its Accept fixes and conflict resolutions submitted to Merget setting is off, or it is in Advisory mode), otherwise eligible, reason (why it takes no fix now: not_enforced, live, landed, not_red, inherited_failure, unjudged or no_commit), suggested_base (the commit to take the diff against) and suggested_number (the pull request Merget suspects). The plan carries amendments_enabled: true while that setting is on in Queue or Autonomous mode. Whether a batch takes a fix is still its amendable: where GitHub does not require the Merget check on the branch a batch's queue lands into, that batch says not_enforced: a batch of a branch or nested queue reads its own branch's protection, so a batch of a stack set to fold, whose branch is not protected, takes none.

Terminal
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  --data @fix.json \
  "$MERGET_URL/v1/orgs/acme/repos/11/queue/batches/b-f9c97304/amendments"

Resolving a pull request's conflicts for merge time

A token with merget:queue.write can hand Merget a resolution of a pull request's conflicts, made on the commit the queue will land for it, instead of pushing its branch, the way a person does from Needs you. See Resolve for merge time for what Merget does with it. The same permission, settings and branch protection apply as for a fix.

MethodPathBodyReturns
GET/v1/orgs/{org}/repos/{repo_id}/queue/entries/{number}/resolutionnonenumber, run_id, handoff_status, resolve (the offer, with its prompt when it is eligible), resolution (the one that stands, or null) and resolutions (the pull request's, newest first, at most 10). Needs merget:queue.read.
POSTthe same path{"base_commit": "…", "patch": "…", "reason": "…"}submitted, amendment and job_id; submitted is false and already true when the same resolution already stood
DELETE/v1/orgs/{org}/repos/{repo_id}/queue/amendments/{id}noneWithdraws a resolution as it withdraws a fix.

Each hand-off the queue serves carries resolve where the repository offers resolutions: eligible, else reason (not_enforced, fork_head, stacked, not_qualifying, rule_first, too_many_files, preparing, unavailable, untrusted_base, nothing_to_resolve or resolution_standing, with detail for unavailable and untrusted_base); an eligible offer adds base_commit (the commit to resolve on), ref (where to fetch it), queue_base, over (the pull requests ahead it composes), paths (the files with conflict markers, each with kind, with, merget_tried when Merget's own resolution of the file does not hold over the queue's base, and, for a modify/delete conflict, deleted_by), merget_paths (the files Merget resolved itself, which you may review), prompt_url (the route above, which serves the prompt), and previous when an earlier resolution of the pull request was set aside (amendment_id, by, status and refusal): where its files' conflicts did not change, its patch still applies to the new commit with git apply --3way. The plan carries resolutions, every resolution of the repository that stands.

base_commit must be the offer's base_commit, the full 40-character sha; patch is the unified diff against it (git diff --cached --no-color --no-ext-diff --no-textconv --no-renames --src-prefix=a/ --dst-prefix=b/ <base_commit>), text only, at most 1 MiB, changing none of the paths Merget never writes, and leaving no conflict marker in a file the offer lists. reason is required, at most 500 characters, with no control characters other than tabs and line breaks, and is shown on the pull request. amendment is shaped as a fix's, with kind resolution, batch_id and batch null, and conflict_paths. One resolution stands per pull request, beside at most one fix. Agents connected through MCP use merget_queue_action with resolve or withdraw_amendment instead. See MCP.

GET /v1/orgs/{org}/repos/{repo_id}/queue/amendments?pr={number} lists what was submitted to Merget for a pull request whether or not it is still in the queue, after it lands or closes too: its resolutions and its fixes in every state, newest first, in items, each shaped as amendment above and read with its diff by its id at /v1/orgs/{org}/repos/{repo_id}/queue/amendments/{id}, with next_cursor for the next page (limit 50 by default, at most 100), and needs merget:queue.read.

A resolution is refused with the errors a fix submission gets, where they apply: github_permission_required, amendments_disabled, amendment_not_applicable and amendment_unenforced; patch_too_large, invalid_body, invalid_reason, invalid_base_commit, protected_path and invalid_patch; pr_not_open, fork_head and entry_not_found; amendment_exists (a resolution already stands for the pull request: withdraw it first); merge_in_flight and reserved_actor. Three are its own: not_handed_off, stale_resolution_base and unresolved_conflict. Withdrawing one answers amendment_not_found, amendment_landed or amendment_settled as for a fix. Where the error table describes one of these codes for a fix ("Fix submission only", "When submitting a fix"), it applies to a resolution's submission, or withdrawal, too.

Retarget a pull request

When a pull request still targets a branch that merged and is gone, the queue can offer a new target. A person with Write access, or an agent with that person's access and merget:queue.write, can apply the change:

MethodPathBodyReturns
POST/v1/orgs/{org}/repos/{repo_id}/queue/entries/{number}/retarget{"base": "main"}ok, number, from, to, merged_owner and rerun.

Use the target suggested by the queue after reviewing it. The branch must exist, and the action changes the pull request's base on GitHub. rerun says whether Merget requested a fresh queue evaluation; it does not mean the pull request has merged. Agents use merget_queue_action with action: "retarget", number and base, after confirming the change with you.

A blank, invalid or unchanged base is refused with 400 invalid_body; a pull request that is no longer open with 404 entry_not_found; a GitHub stack member with 409 stack_member; and a pull request that is not itself orphaned with 409 not_orphaned. 422 base_not_found means the target branch does not exist. See Stacked pull requests.

Move a pull request to the front

A token with merget:queue.write can move pull requests to the front of the queue, and put one back in order, the way a person does from the queue page. See Move a pull request to the front for what Merget does with it. Your permission on the repository in GitHub is checked at the time of the request and must be at least what the repository's Who can move a pull request to the front asks (maintain by default), and for an urgent move what Urgent moves to the front asks. An agent token is refused while the repository's Agents may move pull requests to the front is off. Moving works in Queue and Autonomous mode while Merget is on for the repository, and never on a draft; putting one back in order works in any mode.

MethodPathBodyReturns
POST/v1/orgs/{org}/repos/{repo_id}/queue/entries/{number}/jump{"reason": "…", "urgent": false, "merge_when_green": false, "release": false}; only reason is requiredjumped, number, numbers, brought, follows, released, state, waits_for, place, passes, reprepares, abandons, tested_on, eta_secs, lands_with, urgent, merge_when_green, jump and replanning; jumped is false and already true when it was moved to the front already
POST/v1/orgs/{org}/repos/{repo_id}/queue/jumps{"numbers": [418, 420], "reason": "…", "urgent": false, "merge_when_green": false}jumped, numbers, already (the numbers moved already, skipped), jumps (each number, state, waits_for, place and brought), passes, reprepares, abandons, tested_on, eta_secs, lands_with and replanning
DELETE/v1/orgs/{org}/repos/{repo_id}/queue/entries/{number}/jumpnonecancelled, number, brought, stays_with (a pull request stacked on it whose own move keeps it at the front as its parent, or null), request_withdrawn (the merge request Merget made for the move and withdrew, or null) and replanning

{org} and {repo_id} are as for dismissing a finding. reason is required, at most 500 characters once trimmed, with no control characters other than tabs and line breaks, and is shown on the queue's timeline and on the pull request's Merget check, which is public on a public repository. urgent asks for an urgent move. merge_when_green asks Merget, in Queue mode with batching on, to merge the pull request and the batches ahead of it once its CI passes (Merging it in Queue mode); elsewhere it changes nothing, and where the repository does not batch the move records it as false. release releases a person's hold on the pull request and moves it in one step. numbers holds 1 to 16 distinct pull request numbers, in the order they go first; the bulk route takes no release, and moves all of them or none.

state is placed when the pull request is ready, so Merget places it the next time it plans, or waiting, with waits_for {code, sentence} saying what for: code is one of preparing, checks, review, other, parent, lane, approval, push, fork, needs_you, blocked, skipped, window or target (its batch at the front ended without a CI result, so it waits for the target branch to move), and sentence follows "waiting for" in the queue's words. brought lists the pull requests it is stacked on that move with it, and follows those stacked on it that stand right behind it. place (its rank once placed), passes, reprepares (the pull requests prepared again because their base changes), abandons (for an urgent move, each batch it abandons: batch_id, short_id, state, members and cancel_ci), tested_on (batch_id, or null with the target branch) and eta_secs are what Merget expects from the plan as it stands, never a promise, and null or empty while it waits. lands_with.kind says what merges it: autonomous, land_request (Merget asks for the merge once its batch runs), after_standing_request or covered (with authorization_id), needs_merge_request (Queue mode: a person's Merge N PRs) or github_merge (Queue mode with batching off).

Each entry of the queue the dashboard reads carries jump while a move stands: by, via_agent, reason, at, seq, state, moved (whether the published order already shows it), waits_for, urgent, merge_when_green, role (jumped; ancestor for a pull request it brought, with with naming the moved one; in_place for one already in a batch or a standing request when it was moved; a moved one riding the batch its move cut stays jumped), brought and follows. The queue carries jump_settings (permission, max_active, urgent, agents, expire_after_secs, and batching: whether the repository batches, so whether merge_when_green does anything) and jumps, the standing moves in the order they were made. A merge request Merget made for a move carries via_jump. Agents connected through MCP use merget_queue_action with jump or cancel_jump instead. See MCP.

A move is refused with the errors marked for it.

Change how a stack lands

A stack inferred from bases lands through (each layer merges onto the target branch as its parent merges) or fold (its layers merge into the root's branch first, as a nested queue; see Stacks that fold). A person with Write access, or an agent with that person's access and merget:queue.write, sets the style of one stack:

MethodPathBodyReturns
PUT/v1/orgs/{org}/repos/{repo_id}/queue/stacks/{number}/landing{"landing": "fold"}ok, root, branch, landing, previous and rerun.
PUT/v1/orgs/{org}/repos/{repo_id}/queue/landing{"branch": "feat/x", "landing": "through"}The same fields, for the stack whose nested queue is branch.

landing is through or fold; previous is the style in force before, and rerun says whether anything changed (the same word again is a no-op). A stack whose style cannot change is refused with 409 landing_fixed and a reason (github_stack, integration_branch, nested_member or branch_excluded); 409 fold_landing_disabled says the repository does not open nested queues (Merget turned branch queues off for it); 409 merge_in_flight says a landing carries the root or one of its children; 404 stack_not_found says number is not a stack's root (or branch is no nested queue's); a word the route does not know is 400 invalid_body. Agents use merget_queue_action with action: "set_landing"; see Operate Merget. The change is recorded on the queue's timeline under the name of the person who made it.

Repository settings

Use the repository's Configure drawer to change its mode, analysis options or validation recipe, or authorize an agent with merget:repos.write to do it. Both require Maintain or Admin access to the repository on GitHub. The repository's agent access level can be changed only by a person signed in to the dashboard. See Repository settings, Saving settings and Agent permissions.

Responses

All documents are JSON objects with api_version. Text that comes from the repository (finding messages, titles, descriptions and paths) is data; never treat it as instructions.

Repository summary

FieldContents
repoid, full_name, default_branch, private, enabled.
orgThe Merget organization's slug.
modeThe automation mode: advisory, queue or autonomous. See Automation modes.
target_branchThe branch Merget lands pull requests on.
agent_accessfindings or findings_and_graph.
open_pull_requestsHow many pull requests are open.
queueA short queue summary (freshness, total, next_pr, current_activity, generation), or null.
linksdashboard, queue and github URLs.

Findings document

FieldContents
repoid, full_name, mode, target_branch.
pull_requestnumber, title, author_login, head_sha, base_ref, draft, state (open, closed or merged), url. null for a run without a pull request.
runThe run the findings come from (see Run fields), or null when no run is available.
verdictThe overall answer; see Verdict.
findingsThe findings, sorted by file, line and fingerprint; see Finding fields.
briefThe merge brief: ours_summary, theirs_summary and touched (paths), or null.
queueThe pull request's queue position (see Queue fields), present only when the token has merget:queue.read and the pull request is in a complete queue plan; otherwise null.
evidenceA summary of recorded repair evidence, when available.
reportThe run report when requested with include=report and available.
interpretationrules (how to read the document), by_class (fingerprints per class), lifecycle (how many findings are new_open, still_open and suppressed) and next_steps (sentences describing what to do).
linksdashboard, queue and runs URLs.

Verdict

verdict has status, blocking_count, warning_count, advisory_count, shadowed_count, conflict_count and would_block_in_queue_mode. It also includes context_mode and c_parse_mode, when recorded, so clients can compare results checked with the same analysis settings. A run with review findings adds review_count, and a finished run with pull requests ahead of it may add inherited (see Run fields); neither is ever a reason for the status. A run of a pull request in a nested queue with look-through findings adds look_through_count; it is advisory and never a reason for the status either.

statusMeaning
pendingNo run has finished for this pull request yet, or the run you asked for with run is still queued or running. Counts are zero. Pending is not clean.
failedThe run failed or was cancelled. There is no verdict and the counts are zero; open the run's details.
supersededA newer run replaced this one, or this run analyzed an older head and a newer run is in progress. Read again once it finishes.
blockedA blocking finding, in every mode (except, in Queue or Autonomous mode, one found only over pull requests ahead, run.interaction_wait: waiting, though an older run you ask for reads blocked once its wait has ended): in Advisory mode, one that failed the run's Merget check. Or, in Queue or Autonomous mode, an unresolved conflict that needs your attention.
waitingQueue or Autonomous mode, with pull requests ahead, unmet checks or reviews, preparation awaiting verification, work Merget will retry, or blocking findings found only over pull requests ahead (run.interaction_wait): while one of them is in the queue's prediction (queue.predicted_over), and then, for the pull request's latest finished run, until Merget's new preparation finishes. Only a token with merget:queue.read can see this status.
conflictsAdvisory mode, and git cannot merge the pull request onto the code it will land on: the target branch, or the pull requests ahead of it in the queue, which GitHub shows no conflict with until they merge. It is a textual conflict Merget did not resolve, or a run that ended conflicts. next_steps says what each conflict is with; one only with pull requests ahead is nothing to do until they merge. Findings that do not block are still counted beside it; a blocking finding makes the status blocked. It is never clean. In Queue or Autonomous mode the same pull request reads blocked, or waiting while the queue says why it waits.
cleanNo open findings or unresolved textual conflicts. Resolved conflicts may still be listed.
advisoryThere are findings, but none blocking, and no unresolved textual conflict: only findings classified as warning, advisory or shadowed. In Advisory mode it can also hold blocking findings that did not fail the check, with would_block_in_queue_mode true: from a run recorded before Advisory mode blocked, or that hold only once pull requests ahead of it land. See Findings in Advisory repositories.

would_block_in_queue_mode is true whenever blocking_count is above zero, in every mode, and is kept for compatibility. A blocking finding blocks in Advisory mode too, so the status is usually blocked: report it as blocked. With status advisory, it says what Queue mode's enforced order would make of the findings.

Finding fields

FieldContents
fingerprintA decimal string that identifies the finding. A finding seen in an earlier run keeps its fingerprint.
layer0 (textual conflict), 1 (structural problems in the merged code) or 2 (behavioral interactions between changes). Precise findings can block; see Findings.
kindThe finding type id, for example textual-conflict, broken-reference, deleted-dependency, duplicate-definition, signature-drift, interference-dataflow, interference-confluence or interference-override. See Finding types.
classHow to treat the finding; see below.
provenanceprecise or syntactic, or git for a textual conflict; see below.
precise, blockingBooleans matching provenance and class.
file, line, languageWhere the finding is.
messageThe finding's explanation.
intent_a, intent_bWhat each side of the interaction was trying to do, when known.
lifecyclenew_open (new in this run), still_open (seen before), suppressed (dismissed) or resolved (a textual conflict Merget resolved, or, where the run's held entry for that path has rung person, that a resolution submitted to Merget for merge time did).
shadowed_bySet when a textual conflict hides the finding.
assumption_noteSet when Merget graded the finding as if the pull request's changed files held every definition of the name, then found another definition outside them, so the finding does not block. It names that definition; the finding may still be a real break. See Findings.
scopereview for a review finding: what this pull request breaks against its predicted base (the target branch plus the pull requests ahead of it in the queue). Absent for every other finding.
found_overThe pull requests ahead of it in the queue that the code the finding was found on included, when Merget found it only there. Absent for every other finding.
dismissed_by, dismiss_reasonWho dismissed the finding (a GitHub login, or merget and merget-agent for Merget itself) and why. Absent when it is not dismissed. See Dismissing a finding.
comment_id, comment_urlThe Merget review comment on GitHub for this finding, when there is one.
confidence, confidence_n, confidence_basisThe measured confidence, sample size and supporting information, when available. null means unmeasured, not zero. Use class and blocking to decide whether a finding blocks.
classMeaning
blockingA precise finding. It blocks in every mode: Queue and Autonomous modes hold the merge, and in Advisory mode the Merget check fails (see Findings in Advisory repositories).
warningA Layer 1 finding that is not precise. Review it; it does not block.
advisoryA non-blocking interaction. Review it; it does not stop a merge.
shadowedThe finding sits on a file with a merge conflict. Resolve the conflict first.
conflictA textual conflict. Check lifecycle: a resolved conflict records work Merget completed, or, where the run's held entry for that path has rung person, that a resolution submitted to Merget for merge time did, and does not prevent a clean verdict.
suppressedDismissed: someone with write access, or Merget, said it is wrong. dismissed_by and dismiss_reason say who and why. It never blocks. See Dismissing a finding.
reviewA review finding (scope is review) that does not block. Fix it on the branch. A precise review finding in a language where Merget's review blocks is blocking instead, unless the repository sets review.l1 to advisory or off; see Review findings.

The run page and the runs list count warning and advisory findings together as Non-blocking findings. Here advisory names a class of finding, not the Advisory automation mode: every mode has them. Likewise, a run whose outcome is advisory reads Nothing blocking in the dashboard.

provenanceDashboard labelMeaning
precisePreciseStrong evidence, so the finding can block.
syntacticHeuristicWeaker evidence. The finding does not block and can be a false positive.
gitNoneA textual conflict Git reported (class conflict). It is not graded Precise or Heuristic: read its lifecycle, as described for conflict above.

See Findings for more on layers, classes and provenance.

Run fields

FieldContents
idThe run id.
kindThe kind of run, for example analyze, prepare, land or batch. See Runs.
statusqueued, running, succeeded, failed or cancelled.
outcomeHow the run ended, for example clean, advisory, blocked or prepared. superseded is a run that something overtook before it finished. Statuses and outcomes lists every value with the label the dashboard shows for it.
head_sha, base_shaThe commits the run analyzed.
prepared_headThe commit Merget prepared, when there is one.
staletrue when the run analyzed an older head than the pull request's current one. Wait for the next run.
started_at, finished_atTimestamps.
countsblocking, warning, advisory, shadowed, suppressed, conflict and unresolved_conflict, and review when the run has review findings. conflict includes resolved conflicts; unresolved_conflict counts those still open.
inheritedFindings of the pull requests ahead that this run inherits through its predicted base, one entry per pull request: pr, findings, breaks (how many of them that pull request's own check calls breaks) and an example. They are reported on that pull request's check and never counted here. Absent when there are none.
fixThe fix submitted to Merget that the run carries: amendment_id, by (the submitter's GitHub login), via (person, or agent for an agent token) and only, true when Merget fixed nothing itself in the run, so its Prepared with fixes comes from the submitted fix alone. It also carries published, true, on the run the fix was published from, once Merget has published it to the pull request's branch as a merge of the target branch; an earlier run that carried the same fix leaves it out. Absent when the run carries none. See Submit a fix to Merget.
context_mode, c_parse_modeThe analysis settings used for this run, when recorded. Compare counts between runs using the same settings.
details_urlThe run's page in the dashboard.
check_run_urlThe Merget check on GitHub.

Queue fields

FieldContents
rank, totalThe pull request's place in the queue and the number of pull requests in it.
aheadPull request numbers that must land first.
blockersWhat stands in the way.
sequence_readytrue when the pull request is already prepared to land right after the pull requests ahead of it. It does not mean it may merge now.
merge_eligibilityready, waiting, blocked or unknown.
analysis_state, preparation_stateThe pull request's analysis and preparation states. See Statuses and outcomes.
handoff, held, verificationAdditional reasons the pull request needs attention or is waiting, and its verification result, when available.
jumpPresent while a person has moved the pull request to the front: who (by, via_agent), why (reason), state (placed or waiting, with waits_for), urgent, merge_when_green and role. See Move a pull request to the front.
relationshipsOther pull requests this one interacts with (other), and how (kinds, such as textual, semantic or interference). An interaction is not a dependency. unverified means not yet checked: Merget published the plan before it checked this pair, and orders the two as if they interact until a later plan checks them.
ranking_reasonsWhy the pull request has its place, each with a code and a message.
group_idThe interaction group the pull request belongs to.
predicted_baseThe commit that stands for the code the pull request will meet when it lands.
predicted_overThe pull requests whose landings predicted_base stands for. A pull request ahead that awaits a maintainer's approval, or whose merge conflicts, is not among them.
next_prThe pull request the queue allows to merge next.
freshnessfresh or stale (the plan may be out of date).
generation, base_shaWhich queue plan this is, and the target branch commit it was built from.
enforcementWhether GitHub requires the Merget check; see below.

enforcement has status, reasons, target_branch, mode and checked_at:

statusMeaning
enforcedAt Merget's last check, GitHub required the Merget check on the target branch, required up-to-date branches and allowed no bypass.
not_configuredAt the last check, GitHub did not require all of these, so manual merges can skip queue order or merge on an outdated base. reasons says what is missing.
unknownMerget could not verify the setup, or has not checked it recently.
not_applicableThe repository is in Advisory mode.

plan_offers_no_protection is true when GitHub refused Merget's branch protection read for the repository's plan: a private repository whose GitHub plan offers neither branch protection nor rulesets, where GitHub can't require the Merget check. Otherwise the field is absent. Beside it, status is not_configured, or unknown when another of Merget's reads failed.

See Branch protection.

Runs document

The two runs routes return repo, pull_request (or sha for the commit route), runs (a list of run objects, newest first, limited to the most recent runs) and links.

Pull request queue document

GET …/pulls/{number}/queue returns repo, pull_request (number, head_sha, state, draft, url), queue (the queue fields, or null), enforcement and links.

queue is null when there is no complete queue plan, or when the pull request is closed, a draft, or targets another branch.

Repository queue document

GET …/queue returns the repository's queue as Merget last planned it, not live from GitHub:

FieldContents
generation, freshness, base_sha, updated_atWhich plan this is and how current it is. freshness is fresh, stale or unknown (no plan yet).
current_activityWhat Merget is doing in the queue right now.
planning_errorWhy the last planning attempt failed, or null.
planning_noteWhat the queue waits for that is not an error, or null. While the target branch has no commit yet it reads, for example, "Waiting for the first push to main", and base_sha is null.
planning_degradedInformation about limitations of the published plan, or null. level is 0 for normal analysis, or 1 or 2 for reduced analysis. unverified_pairs counts pull-request pairs not yet checked; do not treat them as independent. reason is memory, time, stopped or deferred. skipped_methods counts methods omitted from deeper interaction checks, or is null. Display these qualifications alongside the plan. They are informational; planning_error reports a failed planning attempt.
total, next_prThe number of queued pull requests and the one allowed to merge next.
enforcementAs in Queue fields.
itemsOne entry per pull request: number, rank, group_id, head_sha, title, author_login, analysis_state, preparation_state, merge_eligibility, blockers, ahead, sequence_ready, ranking_reasons, predicted_base, predicted_over, run_id, github_url, and pr_state, the pull request's own state on GitHub (open, closed or merged), and jump while the pull request is moved to the front (as in Queue fields). An entry can still have a rank after its pull request was merged or closed; anything but open no longer belongs in the order and must not be acted on.
jumps, jump_settingsThe pull requests moved to the front, in the order they were moved (number, by, via_agent, at, seq, state, urgent), and the repository's settings for moving them (permission, max_active, urgent, agents, expire_after_secs, and batching, whether the repository batches). See Move a pull request to the front.
truncatedtrue when the queue has more entries than the response lists.
linksdashboard and repository URLs.

See Repository queue for what these states look like in the dashboard.

Graph queries

POST /v1/repos/{owner}/{name}/graph/{tool} runs one code graph query. The body is a JSON object; an empty body counts as {}. The repository's agent access must be Findings and graph.

{tool} is one of symbols, finding, slice, callers, callees, def_use, diff, intent or blast. The body takes the same arguments as the matching MCP tool, without repo; see MCP tools and Revisions and locators. blast has no MCP tool: its body is rev and at, plus optional hops (1 to 3, default 2) and max_nodes (default 200, at most 500).

Terminal
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"rev": "pr:241:head", "at": "formatCurrency"}' \
  "$MERGET_URL/v1/repos/acme/payments/graph/callers"

curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"rev": "pr:241:base", "to": "pr:241:head"}' \
  "$MERGET_URL/v1/repos/acme/payments/graph/diff"

A successful answer has:

FieldContents
toolThe tool that ran.
revrequested (what you sent) and sha (the commit it resolved to). For a branch, sha can be null and branch names the branch.
resultThe structured answer. Its shape depends on the tool.
markdownThe same answer as Markdown.
truncatedtrue when the answer was cut to fit max_tokens. Narrow the query rather than repeating it.
tokensThe size of the answer.

Result shapes by tool:

Toolresult
symbolspath and symbols (each with file, line, line_end, name, full_name and provenance).
callers, calleesdirection, method and rows (each with node, site, hop, via and provenance).
def_usevar, method and chains (each a def with a use).
sliceseeds, regions (each with file, line, line_end, role, provenance) and chain.
diffsymbols_added, symbols_removed, resignatured, calls_added, calls_removed. A renamed symbol appears as removed plus added.
findingfinding and slice.
intenttitle (the pull request's title), body (the merge brief's two summaries as text), pull_request (number, url, head_sha, run), brief and intents (the intents recorded on each finding). The rev must point at a pull request's head, such as pr:241:head.
blastorigin, lang, hops, max_nodes, depths (each with depth, count, unlisted, complete and symbols), total, edges (each with from, to, depth, kind, line and provenance), truncated and dropped. Depth 1 is the methods that call at, depth 2 the methods that call those, and so on; each method appears once, at its first depth. A lambda or other function written inside a method counts as reached by that method, through an edge whose kind is defines; other edges are call. At most max_nodes methods are listed in all. Past that, each depth's unlisted counts the methods found there but not listed, and deeper depths are still searched. truncated is true when methods went unlisted, when a method's extra edges were left out (each listed method keeps one), or when the time limit stopped the search; dropped says which. A depth the time limit stopped has complete set to false. max_tokens shortens only markdown: result keeps every listed method, and truncated stays false.

On callers and callees rows, provenance is an object: read provenance.class, which is precise or a less certain value such as syntactic. On a slice region, provenance is a string: seed for the code you asked about, precise, or a less certain value. A row that is not precise may be wrong, and a call can be missing from a list, so treat an empty callers list as "none found", not as proof that there are none.

Graph pending

When the graph for that commit is not ready yet, the route answers 202 with code graph_pending, retry_after_secs and retryable: true. Wait that many seconds and send the same request again. The first query on a new commit often answers this way.

retry_after_secs is about how long the build has left. Merget estimates a build from the repository's recent builds or, before its first build, from the size of the commit, and adds a minute while your organization's other graph builds hold every build slot. When Merget has no estimate, or the build has already run past it, retry_after_secs is 10.

When a graph can't be built

When Merget cannot start a build for the commit, the route answers an error that says why instead of graph_pending, so a script never waits for a graph that will not come. A commit whose graph is already built is answered as usual, even in a repository Merget is now turned off for. Each of these errors carries reason:

StatusCodereasonMeaningWhat to do
409repo_disabledrepo_disabledMerget is turned off for the repository.Turn it on; see Turn a repository on.
409installation_inactiveinstallation_inactiveThe Merget GitHub App is suspended, or its installation no longer includes the repository.Have a GitHub admin unsuspend the App or add the repository; see Suspended installations.
404commit_not_on_githubnot_on_githubThe commit is no longer on GitHub: its branch was deleted or force-pushed.Query a commit that is still on a branch, such as pr:<n>:head of an open pull request.
429quota_exceededquota_spentThe organization has used today's graph builds. quota is builds, with used, limit and retry_after_secs until 00:00 UTC.Wait for the reset.

The first three carry retryable: false: repeating the request does not help until the cause is fixed. message says the same in one sentence:

JSON
{
  "code": "repo_disabled",
  "error": "repo_disabled",
  "message": "Merget is turned off for this repository, so it does not build graphs for it. Turn it on under Repositories to build one.",
  "reason": "repo_disabled",
  "retryable": false
}

Repository configuration

Analysis and merging options are described in Repository settings. Configure them in the dashboard, or have an agent with the permission to change repository settings do it (merget_repo_update; see Operate Merget). Both save through PATCH /v1/orgs/{org}/repos/{id}, and the shape it takes is described here so that a script reading a repository's settings, or a client that saves them on a person's behalf, knows what it gets and what it may send.

The settings object

Two fields describe a repository's settings:

FieldWhereContents
policyOn every repository document: each item of GET /v1/orgs/{org}/repos, and the answer to a save.The repository's settings as the customer sees them: every setting a person can change in the drawer or through this API, under the names below, and nothing else. Settings managed by Merget are not included. validation_timeout_secs is the time limit for your commands.
policy_schemaOnce beside the list ({"items": […], "next_cursor": null, "policy_schema": […]}), and on the repository document a save answers with.A list describing every key policy may hold: key (a dotted path such as batch.max_inflight, which a save writes as nested objects), class (customer, or bounded for a key with a range), group (the drawer group), kind (bool, int, secs, float, string, enum, object, strings, rules, map or validation), values for an enum, min and max for a bounded key (both allowed), exclusive_min and exclusive_max for a float (neither allowed), and for validation its words in values (Off, Auto) and its recipe forms in forms (each form's one key and the kind of its value). It is the same list for every repository and says which values a save will accept; read the ranges from it rather than from this page.

The keys are the settings of Repository settings, by group: merge_method; generated (a list of rules with paths, regenerate, cwd, strategy and inputs) and generated_heuristics; validation and validation_timeout_secs; batch with enabled, max_size, landing, max_wait_secs, max_inflight, min_green_probability, checks, check_paths, ci_timeout_secs, cancel_ci, ci_failure, land_certified_requires_build and amendments; queue with skip_after_secs, passing_lane (enabled, max_members, after_secs) and jump (permission, max_active, urgent, agents, expire_after_secs; see Queue behavior); untrusted_heads and trusted_bots; trunk with verify, verified_ref and reset_on_rewrite; c with parse, include_dirs, defines and std; layer2; l2_blocking with mode; resolution_scope; max_widened_files; and review with l1 (off, advisory or blocking, the default; not in the drawer, so set it through this API or an agent: {"policy": {"review": {"l1": "advisory"}}} keeps review findings from blocking).

Saving settings

A save sends policy as a JSON merge patch over the settings object, never as a replacement:

  • A key the patch leaves out keeps its stored value.

  • A key set to null is removed, and the setting returns to its default.

  • A key whose kind is object (batch, queue, queue.passing_lane, queue.jump, trunk, c, l2_blocking, review) is merged key by key, so {"batch": {"max_inflight": 3}} changes nothing else in batch.

  • Every other value replaces what was stored as a whole: a validation recipe, the generated list, the check_paths map.

  • Sending the whole settings object back is a valid patch; a key sent with its stored value changes nothing.

  • Two saves made at the same time both apply: each is merged over the settings as they stand when it is written, so a save of one key never undoes a save of another.

A save is judged by what it changes. A key sent with the value already stored changes nothing and is accepted whatever it holds, so a save of the whole settings object always works: a stored value above a range that came later is used as the top of the range until it is changed, and a new value outside the range is refused like any other. A key the settings hold that Merget does not recognise can be sent back unchanged, or set to null to remove it; any other value for it is refused.

The answer is the repository document with the settings as they are now stored, and policy_schema beside them. Nothing is saved when any part of the patch is refused:

StatusCodeMeaning
400policy_key_not_customerThe patch sets a key a customer may not set: one Merget manages, even to null, or one that does not exist, to any value but the one already stored or null. path names the first such key on the way down: a section Merget manages is named whole, not the key inside it.
400policy_out_of_rangeA bounded key is outside its range. path, min and max say which and what the range is; the value is refused, never rounded into range.
400invalid_policyThe value has the wrong shape or fails a rule — a recipe without a command, a merge method that is not merge, squash or rebase, a section that is not an object, a key written as a dotted path (send {"batch": {"enabled": false}}, not {"batch.enabled": false}) — judged on the settings as they would be stored after the patch. message says what, and field names the key when one is at fault. A merge method GitHub does not allow is refused this way too, with github_settings_url and merge_methods.

For example, {"policy": {"batch": {"max_inflight": 10001}}} answers 400 policy_out_of_range with "path": "batch.max_inflight", "min": 1 and "max": 10000; {"policy": {"no_such_setting": 1}} answers 400 policy_key_not_customer with "path": "no_such_setting", and a setting Merget manages is refused the same way.

C parsing

Use Advanced › Language configuration in the repository's settings for include directories, defines and the language standard. See C parsing.

Errors

Errors are JSON:

JSON
{
  "code": "repo_not_found",
  "error": "repo_not_found",
  "message": "acme/payments is not a repository this token can read"
}

code and error are the same. Some errors add fields such as retryable, retry_after_secs, scope or suggestions. Sign-in errors have no message. For server errors (5xx), message always reads "internal error".

StatusCodeMeaningWhat to do
202graph_pendingThe graph for that commit is not ready yet.Wait retry_after_secs, then repeat.
400invalid_owner, invalid_nameThe owner or name has characters GitHub does not allow.Fix the path.
400invalid_numberThe pull request number is not positive.Fix the path.
400invalid_shaThe sha is not 7 to 40 hex characters.Fix the path.
400invalid_formatformat is not json or markdown.Fix the parameter.
400invalid_argumentA graph argument is missing or invalid, the body is not JSON, a name matches several symbols, or Merget cannot build a graph for that commit.Read message.
400rev_unresolvedA revision cannot be resolved.Check the revision.
400policy_key_not_customerSettings save only: the patch names a setting Merget manages, or one that does not exist; path names it.Remove it. See Saving settings.
400policy_out_of_rangeSettings save only: a setting is outside its range; path, min and max say which.Choose a value in range. See Saving settings.
400invalid_policySettings save only: a setting has the wrong shape or breaks a rule; message says what.Read message. See Saving settings.
400invalid_fingerprintDismissal only: the fingerprint is not the decimal number the findings document prints.Copy it from the findings document.
400invalid_reasonWhen dismissing a finding: the reason is missing, blank, longer than 500 characters, or holds a control character other than a tab or a line break.Say why the finding is wrong, briefly, in plain text.
400invalid_body, invalid_batchWhen submitting a fix: the body is not {base_commit, patch, reason, number?}, or the batch is neither an id nor a b-xxxxxxxx name.Fix the request.
400invalid_base_commitFix submission only: base_commit is not a full 40-character sha.Copy the full sha the batch's details name.
400invalid_reasonWhen submitting a fix: the reason is missing, blank, longer than 500 characters, or holds a control character other than a tab or a line break.Say in a sentence of plain text what the fix changes.
400invalid_patchFix submission only: the patch is not a git diff, or carries binary content, a symbolic link or a submodule; why says which.Submit a text diff.
400protected_pathFix submission only: the patch changes a path Merget never writes; paths names them.Change those files on the branch instead.
400invalid_bodyWhen moving a pull request to the front: the body is not {reason, urgent?, merge_when_green?, release?} (or {numbers, reason, urgent?, merge_when_green?} for several), carries a key it does not know, or numbers is empty, repeats a number, holds more than 16 or one below 1.Fix the request.
400invalid_reasonWhen moving a pull request to the front: the reason is missing, blank, longer than 500 characters, or holds a control character other than a tab or a line break.Say why it goes first, briefly, in plain text.
401missing_authorizationNo bearer token.Send Authorization: Bearer <token>.
401invalid_tokenThe token was not accepted.Sign in again.
401token_expiredThe token is more than an hour old.Use a fresh token.
401token_revokedThe approval was revoked.Sign in again.
402credits_exhaustedWhen moving a pull request to the front: the organization has used its credits for the period up to its spending cap. Putting one back in order is never refused for this.Ask an owner to raise the cap, or wait for the next period. See Spending cap.
403insufficient_scopeThe token lacks the scope in scope. The WWW-Authenticate header names it too.Switch it on for the agent in Settings › Agents, or sign in again and approve it. See Change an agent's permissions.
403agent_access_disabledThe organization switch is off, the repository is Off, or a graph query was sent for a Findings only repository. For the organization switch, org is the organization's slug and org_name its name (null when it has none or Merget cannot read it).See Control agent access.
403agent_keys_disabledThe token was made from an agent key, and the organization's owner does not let agent keys in. org and org_name name the organization as for agent_access_disabled. An agent that signed in is not affected.Ask an owner to allow agent keys in Settings › Agents, or sign the agent in.
403agent_jump_disabledWhen moving a pull request to the front or putting one back in order: the token is an agent's, and the repository's Agents may move pull requests to the front is off; repo names the repository.A person can do it in the dashboard, or someone with Maintain access can turn the setting on. See Queue behavior.
403product_not_entitledThe account does not have access to Merget.Contact support at support@merget.ai. Access is set by Merget, not by organization owners.
403session_requiredAn agent token asked for something only a person signed in to the dashboard can do: changing what agents may do, reading or changing dependency access grants, an organization owner's step (an agent never acts as an owner), creating an organization, or deleting an organization or account.Use the dashboard.
403agent_scope_disabledThe organization does not let agents use the permission the route needs; scope names it, and org and org_name the organization (its slug, and its name, null when it has none or Merget cannot read it).Ask an owner to allow it. See Organization permissions.
403github_link_requiredYou have no GitHub account linked in Merget, and this repository is not one Merget can show you without it. The body carries link_url, where you link an account.Link your GitHub account in Settings › Account, then retry.
403reserved_actorWhen dismissing a finding: your login is merget or merget-agent, the names Merget records its own dismissals under, so yours would read as Merget's.Dismiss from another account.
403reserved_actorWhen submitting a fix: your login is one of the names Merget records its own work under, so your fix would read as Merget's.Submit from another account.
403github_permission_requiredDashboard actions only: your permission on the repository in GitHub is below what the action needs. required names it (push for Write, maintain or admin) and repo names the repository. Moving a pull request to the front needs what the repository's settings ask, maintain by default, and an urgent move what its own setting asks.Ask a repository admin on GitHub for that access. See Team and access.
404repo_not_foundThe token cannot read this repository: Merget does not know it, the GitHub App is not installed, it belongs to another organization than the one approved, you are not a member, or it is private and your GitHub account can't read it.Check the name and the approved organization, and that your GitHub account can read the repository.
404pr_not_foundMerget has not seen this pull request.Check the number.
404run_not_foundThe run is not part of this repository or pull request.List runs with …/runs.
404finding_not_foundDismissal only: no run of this pull request recorded a finding with that fingerprint. A textual conflict cannot be dismissed.Check the fingerprint and the pull request number.
404batch_not_found, entry_not_foundWhen submitting a fix: no such batch in this repository, or the queue does not hold the pull request.Check the batch or the number.
404entry_not_foundWhen moving a pull request to the front: the number is not in the queue's current plan, which includes a pull request Merget does not plan yet; when putting one back in order: no such open pull request. pr names it.Refresh the queue and check the number.
404amendment_not_foundWithdrawing or reading a fix only: no such fix in this repository.Check the fix's id.
404tool_not_found{tool} is not a graph tool. The body lists the valid ones.Fix the path.
404symbol_not_foundNo symbol, file or line matches. suggestions lists close matches with text, path and line.Use a suggestion, or query symbols.
404commit_not_on_githubGraph queries only: the commit is no longer on GitHub, because its branch was deleted or force-pushed, so Merget cannot build its graph. reason is not_on_github.Query a commit that is still on a branch. See When a graph can't be built.
409repo_disabledGraph queries only: Merget is turned off for the repository, so it builds no graph for it.Turn the repository on. See When a graph can't be built.
409installation_inactiveGraph queries only: the Merget GitHub App is suspended, or its installation no longer includes the repository.Have a GitHub admin unsuspend the App or add the repository. See When a graph can't be built.
409amendments_disabled, amendment_not_applicable, amendment_unenforcedFix submission only: the repository's Accept fixes and conflict resolutions submitted to Merget setting is off, its mode is Advisory, or GitHub does not require the Merget check on the branch the batch's queue lands into (for a resolution, the queue holding the pull request) (enforcement).Push the fix to the branch, or change the setting or the branch's protection.
409not_handed_offResolution submission only: the pull request's hand-off offers no resolution now; reason says why, as the offer's reason does, or no_handoff.Read the hand-off again, or resolve on the branch.
409stale_resolution_baseResolution submission only: the hand-off now offers another commit to resolve on (base_commit, ref).Fetch the new commit, carry your resolution over and submit against it.
400unresolved_conflictResolution submission only: the patch leaves conflict markers in path.Resolve every conflict marker in it.
409batch_not_amendableFix submission only: the batch takes no fix now; reason is live, landed, not_red, inherited_failure, unjudged or no_commit.Wait for its CI, or fix the batch the failure came from.
409base_commit_not_in_batch, base_commit_before_member, not_a_memberFix submission only: base_commit is not a commit the batch tested (accepted lists them), it comes before the pull request number joined the batch, or number is not in it.Use a commit and pull request of the batch.
409member_head_moved, fork_headFix submission only: the pull request got a new commit since the batch tested it, or comes from a fork.Submit a fix for the batch that tests its new head, or push the fix to the branch.
409pr_not_openWhen submitting a fix: the pull request is no longer open.Nothing to fix there.
409merge_in_flightWhen submitting or withdrawing a fix: the pull request is being merged now; batch_id names the batch landing it, when one is.Wait for the merge to finish.
409amendment_existsFix submission only: a fix already stands for that pull request; amendment_id, by and status name it.Withdraw it first.
409amendment_landed, amendment_settledWithdrawal only: the fix already landed, or already ended (status).Nothing to withdraw.
409batch_ambiguousWhen submitting a fix: the b-xxxxxxxx name matches more than one batch; candidates lists their ids.Use the batch's full id.
409jump_not_applicableWhen moving a pull request to the front: the repository is in Advisory mode (mode), where there is no order to move it to the front of, or Merget is turned off for it (reason is disabled), or moving pull requests to the front is not turned on yet (reason is not_enabled).Switch the repository to Queue or Autonomous mode, or turn Merget on for it. With not_enabled there is nothing to change on your side: moving pull requests to the front is not available yet.
409urgent_disabledWhen moving a pull request to the front: urgent is set, and the repository's Urgent moves to the front is Off.Move it without urgent, or change the setting.
409merge_in_flightWhen moving a pull request to the front: Merget is merging it now; batch_id names the batch landing it, when one is. When putting one back in order: the merge request Merget made for the move is landing its batch.Wait for the merge to finish.
409pr_not_openWhen moving a pull request to the front: it was closed or merged since the queue was planned.Nothing to move.
409pr_draftWhen moving a pull request to the front: it is a draft now, though the queue was planned before it became one; pr names it.Mark it ready for review: Merget queues it then, and it can be moved.
409stack_memberWhen moving a pull request to the front: it is a layer of a GitHub stack, or is stacked on one; pr names it and layer the layer. Merget does not move a GitHub stack's layers to the front.Leave it in its place: the stack's layers land in the stack's order.
409pr_heldWhen moving a pull request to the front: a person holds it back; by names them.Release it first, or send release: true to release it and move it in one step.
409jump_limitWhen moving pull requests to the front: more would stand at the front than the repository allows, whether as many stand there already or a move of several asks for more than the room left. max_active is the limit, standing lists those that stand (each number, by, at and state) and asked the numbers you sent.Move fewer, or put one back in order first.
409not_jumpedWhen putting a pull request back in order: it is not moved to the front.Refresh the queue.
413patch_too_largeFix submission only: the patch is larger than 1 MiB (max_bytes).Submit a smaller fix, or push it to the branch.
422budget_exceededmax_tokens is too small for the shortest answer.Raise it once.
429rate_limitedToo many requests.Wait and retry; see Rate limits.
429graph_busyToo many graph queries at once.Retry after retry_after_secs.
429quota_exceededOne of the organization's daily graph allowances is used up: its graph queries, or its graph builds (quota is builds and reason is quota_spent; only a request that would start a build is refused).Wait for the reset at 00:00 UTC (retry_after_secs).
502forge_unavailableMerget could not verify your account or organization membership right now.Retry later.
502github_unavailableDashboard actions only: GitHub did not answer when Merget checked your permission for the action.Retry later.
503graph_unavailableGraph queries are temporarily unavailable.Retry later.
503github_rate_limitedDashboard only: Merget could not check something with GitHub right now, such as your permission for an action. retry_after_secs gives the wait when it is known.Retry after the wait.
504timeoutThe query ran past its time limit.Narrow the query.
500internalSomething went wrong on Merget's side.Retry; if it persists, see Help and support.

Requests that take too long are refused with 408, and requests with very large bodies are refused as well.

Rate limits

Requests are limited, and the limits are shared with the MCP server. On rate_limited or graph_busy, wait and retry.

  • Request rate. Over the limit, requests answer 429 rate_limited with a Retry-After header and retry_after_secs; wait at least that long before retrying (graph queries have a lower rate and a longer wait).

  • Graph queries. Graph queries have a lower limit. When too many run at once, extra ones answer 429 graph_busy with retry_after_secs.

  • Daily graph allowances. Each organization has two, shared with the dashboard's Code graph page and counted separately: one for graph queries and one for graph builds. Both reset at 00:00 UTC. When the queries are used up, queries answer 429 quota_exceeded until the reset. When the builds are used up, only a request that would start a build answers 429 quota_exceeded (quota is builds); queries of graphs already built still answer. See Graph capacity.

  • List sizes. The runs lists return only the most recent runs. The repository queue and callers or callees lists are capped, and truncated tells you when more exists.

Calls appear in Settings › Agents › Usage · last 7 days. See Languages and limits for other limits.