Troubleshooting
Symptoms grouped by where they surface. Machine-readable codes are listed in the error code reference.
Authentication and tokens
Section titled “Authentication and tokens”401 Unauthorized
Section titled “401 Unauthorized”The token is unknown, revoked, or expired. Named API tokens can carry a
1–365 day expiry, checked on every request, and an expired token is a 401
everywhere — API and git alike. Check the token’s expiry in Settings; revoked
and expired rows are kept, so it will still be listed.
An agent token also fails closed if its owning user is being deleted.
403 TOKEN_SCOPE_INSUFFICIENT
Section titled “403 TOKEN_SCOPE_INSUFFICIENT”You are using a read token for a write. On API routes a read token is
refused with this 403 on everything that is not a GET or HEAD. Over
git the same rule applies to git push — including the
info/refs?service=git-receive-pack advertisement that precedes it — but
surfaces as a plain 404 (“Not found”), deliberately identical to a missing
repository so permissions can’t be probed. A push that mysteriously 404s on a
repo you can clone is this. Mint a read_write token, or use the one you
meant to.
Read-only bounds damage, not exposure: a read token still reads every
private project its owner can read.
403 TOKEN_BINDING_EXCLUDES_ROUTE
Section titled “403 TOKEN_BINDING_EXCLUDES_ROUTE”The token is limited to one project or organization, and the endpoint is not a project endpoint — account settings, usage, token or agent creation, organization administration, bulk import, the admin API, or a web page. A bound token reaches only project surfaces, MCP, and git. Use an account-wide token (or the settings UI) for these.
A bound token gets 404 on a project you can see
Section titled “A bound token gets 404 on a project you can see”That project is outside the token’s binding. A token limited to a project or organization answers every other project exactly as if it did not exist — public ones included — so the binding does not reveal what else the account owns. Check the token’s Access column under Settings → API tokens.
403 SESSION_REQUIRED
Section titled “403 SESSION_REQUIRED”Token-management endpoints (GET|POST /api/users/me/tokens,
DELETE /api/users/me/tokens/{id}, POST /api/users/me/legacy-token/disable,
and rotate-token for scoped tokens) accept the browser session cookie
only, whatever the token’s scope. A token that could mint or revoke tokens
would make revocation meaningless. Do it from the settings UI.
409 TOKEN_LIMIT_REACHED
Section titled “409 TOKEN_LIMIT_REACHED”You hold 20 active tokens. Revoke one — revoked tokens do not count toward the limit, so rotating never locks you out.
A token shows as never used
Section titled “A token shows as never used”lastUsedAt is written at most once an hour, and not at all on the git
smart-HTTP path, which has no execution context to defer the write to. A token
used only for git clone legitimately shows as never used.
Imports
Section titled “Imports”The import is stuck in “Import in Progress” or CANCELLING
Section titled “The import is stuck in “Import in Progress” or CANCELLING”It is not stuck any more. A scheduled sweep moves wedged jobs to a terminal
state on their own: a cancel that never finished lands in cancelled,
anything else that stopped progressing lands in failed. A job that was never
picked up by a worker gets a much longer grace period than one that started and
stalled, and its message will say the queue message was likely lost — retry to
re-queue it.
Previously this recovery only ran when somebody happened to open the project’s progress page, so an abandoned job could claim to be running indefinitely.
The import failed on submodules
Section titled “The import failed on submodules”Git submodules are not supported. A gitlink entry at any depth, or a
root-level .gitmodules, fails the import rather than silently importing a
broken tree.
On import the scan is best-effort: if the just-imported tree cannot be read at all (the read token cannot be minted, the clone fails, or the scan itself errors) the import proceeds with a warning and is left unscanned, rather than failing a healthy repository over an infrastructure hiccup. So a completed import is not on its own proof that a repository is submodule-free.
The same scan runs whenever a change is created — on a gated push and through
POST /api/projects/{name}/changes alike — and there it is unconditional: a
change carrying submodule content is refused, and so is one whose scan could not
run. That is the gate that keeps submodule content out of a merge. See
Unsupported content.
The import failed on Git LFS
Section titled “The import failed on Git LFS”Git LFS is entirely absent — there is no /info/lfs route and no
objects/batch endpoint, so an LFS-enabled clone or push fails when the
git lfs client tries to reach them. Pointer files import as ordinary text.
SYNC_DIVERGED
Section titled “SYNC_DIVERGED”The upstream and the Stratum copy have genuinely diverged in content — this is
raised only for real conflicts, not for a fetch window that was merely too
shallow. The fetch window is deepened incrementally before this is reported, so
a SYNC_DIVERGED means the histories actually conflict, not that the clone was
too shallow.
Only some tags came across
Section titled “Only some tags came across”Tag fetching pulls only tag-reachable objects and caps the tag count, reporting
truncated explicitly rather than silently dropping the rest.
Evaluation
Section titled “Evaluation”Every change fails on SANDBOX binding is not configured
Section titled “Every change fails on SANDBOX binding is not configured”Your policy names a sandbox evaluator on an instance without the Cloudflare
Sandboxes binding. [[sandboxes]] is commented out in wrangler.toml (it is a
gated beta), so this is the default state on the hosted instance and on a fresh
self-host.
The evaluator is not skipped. It is replaced with one that returns score 0 /
failed and the reason “sandbox unavailable: SANDBOX binding is not configured —
enable [[sandboxes]] in wrangler.toml or remove the sandbox evaluator from
the policy”. That drags the aggregate verdict down, and if sandbox is listed in
merge.requiredEvaluators it blocks every merge in the project.
Remove the sandbox evaluator (and any "sandbox" entry in
requiredEvaluators) from .stratum/policy.yaml, or enable the binding. Note
the recovery commit edits a protected config file, so it needs a human approval
and cannot be force-merged. merge.postMergeCommand behaves differently: with
no binding it is skipped with a warning rather than failing the merge.
The llm evaluator fails closed the same way when the AI binding is absent
(llm unavailable: AI binding is not configured), though wrangler.toml does
bind Workers AI in every environment.
The remaining entries in this section apply only where Sandboxes is enabled.
sandbox budget exceeded (install) or (command)
Section titled “sandbox budget exceeded (install) or (command)”The evaluation ran out of its total time budget — totalBudgetMs, default
150s — which bounds the sum of the install and command phases. Each phase is
granted min(configured, budget remaining), and exhausting the budget returns a
failing verdict naming the phase rather than hanging.
Raise totalBudgetMs on the sandbox evaluator in .stratum/policy.yaml, or
make the phase cheaper. Note the per-phase defaults (installTimeoutMs 90s,
timeoutMs 60s) sum to exactly the default budget, so an unconfigured project
is never truncated.
A native module fails when the test command loads it
Section titled “A native module fails when the test command loads it”Dependency installs pass --ignore-scripts, because the evaluated tree is code
an agent wrote and a preinstall/postinstall would run before any human
review. The symptom is not a failing install — the module installs unbuilt
and then fails at load. If your build genuinely needs lifecycle scripts
(native modules, a prepare step), set allowInstallScripts: true on the
sandbox evaluator.
A change that passed before now fails on re-evaluation
Section titled “A change that passed before now fails on re-evaluation”Re-evaluating runs under the current defaults, and the default install timeout
dropped from 120s to 90s. Re-check against totalBudgetMs above.
Evaluation fails with Could not find where this workspace forked from ...
Section titled “Evaluation fails with Could not find where this workspace forked from ...”A change is evaluated on what its workspace changed: the diff from the commit
the workspace forked from to the workspace’s tip. Commits the project gained
after the fork are not part of it. To find the fork point Stratum reads the last
64 commits of each side. A workspace further behind than that fails with this
message (API code FORK_POINT_NOT_FOUND) instead of being judged on a diff that
would show the project’s newer commits as undone.
Bring the workspace up to date, then evaluate again. From a checkout of the workspace, merge or rebase onto the project’s default branch and push; or fork a new workspace and re-apply the change there.
The same message appears when the project’s history was replaced after the workspace forked (a break-glass resync, for example), because the two then share no commit at all. Merging will not help there; fork a new workspace.
The llm gate fails with a reason about a provider
Section titled “The llm gate fails with a reason about a provider”These are all the same shape: the gate ran and failed, rather than being skipped, and the reason names its own cause. That is deliberate — a policy that requires AI review must not stop requiring it because the configuration is wrong, so none of these fall back to the operator’s model.
provider "x" is not configured—.stratum/policy.yamlnames a provider this instance’s operator has not put inLLM_PROVIDERS. Self-hosting, add it; on someone else’s instance, ask them which names they offer, or dropprovider:to use the instance’s own binding.- A missing or undecryptable key — the project has no stored credential for
that provider, or the instance has no
DEPLOY_SECRET_KEY. Re-enter the key in the project’s secret settings. - After a
DEPLOY_SECRET_KEYrotation — rotating that key makes every stored project secret undecryptable, deploy secrets and provider keys alike, so BYOK projects block until each re-enters its key. This is the documented cost of a rotation, not a fault. - A redirect from the provider — a 3xx is refused rather than followed,
because the allowlist validates the host a request is sent to and a redirect
would move the prompt and your API key somewhere unvalidated. Check the
baseUrlthe operator configured; it usually means a missing/v1. - Two
llmentries — a policy declaring the evaluator twice is refused outright rather than one being picked. Keep one.
The llm gate fails every change with LLM error
Section titled “The llm gate fails every change with LLM error”A reason that starts LLM error: means the model could not be reached at all,
and one that says no verdict within ...ms means it did not answer in time.
Neither says anything about the change. The usual cause is a retired model:
Workers AI withdraws models on published dates, and after that every request
for one fails with error 5028.
- Your policy names a
model. Check it against the Workers AI model catalog and replace it if it is marked deprecated. A model that reasons before it answers may also need atimeoutMsabove the 30-second default. - Your policy names no
model. The instance’s default is the one that failed, which is the operator’s to fix by upgrading Stratum.
The instance checks this itself (self-hosting)
Section titled “The instance checks this itself (self-hosting)”Once a day an instance checks its own evaluation in two ways:
- A trial run. It runs its default
llmmodel on two fixed diffs, one that should pass and one that should not. The two diffs are built into Stratum; no project’s code is sent. An instance with no Workers AI binding skips this part and still does the next. - Counts over the last 24 hours, from real evaluations. It reports when at
least five
llmreviews, and at least half of them, ended with no verdict from the model (a provider error or a timeout). It also reports when at least three changes had an evaluation that never reported back at all, which usually means the evaluation worker is being stopped mid-run by a memory or time limit; look forexceededMemoryorexceededCpuon thestratum-evaluationsqueue consumer in the Worker’s logs.
Set OPS_ALERT_PROJECT in the environment’s [vars] to a project on the
instance, as "@namespace/slug", and a failed check opens an issue there
titled Evaluation health check is failing, authored by Stratum (automated).
It lists what failed. While it is open no second issue is filed, and it is
closed automatically when the check passes again. Left unset, which is the
default, the result is written to the Worker’s logs only.
To be emailed as well, set the OPS_ALERT_EMAIL secret to an address. A secret
belongs to one deployment: for a top-level deployment run
wrangler secret put OPS_ALERT_EMAIL, and for a named environment add
--env <name>, for example --env production. The instance then sends one
message when the issue is opened and one when it is closed. This needs the
instance’s email sending to be configured (EMAIL binding and
EMAIL_FROM_ADDRESS). With no OPS_ALERT_PROJECT, with one that cannot be
found, or when the issue could not be opened, there is no issue to mark the
alert as already raised, so a failing check sends a message every day until it
passes, and none when it does. Each of those messages says why no issue was
opened.
... allowance is used up or an evaluation rate limit
Section titled “... allowance is used up or an evaluation rate limit”Only reachable on an instance whose operator has configured a billing service and switched enforcement on. The reason names what ran out, when it resets, and both ways forward: bring your own provider key, or raise the plan. Your own key lifts the token allowance only. The hourly evaluation ceiling still applies whichever account owns the model key, because what it bounds is evaluation and Worker capacity on the instance rather than model spend.
Check /settings/usage (or GET /api/users/me/usage, or stratum_get_usage
over MCP) for what is left and when the period rolls over. Self-hosted, none of
this is reachable: every allowance reads as unlimited and nothing is refused.
Merging
Section titled “Merging”STALE_BASE / STALE_WORKSPACE / WORKSPACE_UNVERIFIABLE
Section titled “STALE_BASE / STALE_WORKSPACE / WORKSPACE_UNVERIFIABLE”The change was evaluated against code that is no longer what would land.
Re-evaluate on the current base. STALE_WORKSPACE specifically means the
workspace advanced after evaluation, so unevaluated commits can never slip in.
Approvals disappeared
Section titled “Approvals disappeared”Approvals are dismissed when the evaluated base moves, not only when the tip does — a change re-evaluated against a newer base was previously keeping approvals that had been granted against different code.
PROTECTION_BLOCKED
Section titled “PROTECTION_BLOCKED”The response lists the specific reasons. Common ones:
- Not enough approvals. Remember the change author’s own approval does not count; for an agent-created change the excluded author is the agent’s owning user.
- The change edits the merge-protection config, which requires an approval
even when
requiredApprovalsis 0.
WORKSPACE_BEHIND on a squash merge
Section titled “WORKSPACE_BEHIND on a squash merge”A squash merge replaces the project’s files with the workspace’s. If the
workspace does not contain the project’s latest commits, that would undo them,
and the gates never saw that: a change is evaluated on what its workspace
changed since it forked. Bring the workspace up to date and evaluate again, or
merge without squash, which merges three ways and keeps both sides.
For the same reason a batch merge skips such a change with workspace is behind the project; merge this change on its own.
MERGE_CONFLICT
Section titled “MERGE_CONFLICT”The response carries a conflict id for
POST /api/projects/conflicts/{id}/resolve. Manual resolutions are not a
back door: they are secret-scanned and run through the full merge gate,
reusing the originating change’s review trail.
Projects and access
Section titled “Projects and access”404 on a project you believe exists
Section titled “404 on a project you believe exists”Read access is checked before existence is revealed, so an unauthorised private
project is a 404, not a 403. Check the namespace and slug, and that your
token’s owner has access.
409 TARGET_DELETING
Section titled “409 TARGET_DELETING”The project, or its owner’s account, is being deleted. Writes are refused so the cascade is not fighting new rows.
Getting help
Section titled “Getting help”Include the machine-readable code where there is one, the project path, and
the change or issue number. Open an issue on
GitHub.