Skip to content

Reason codes

Every needs_human incident carries a reason_code, a reason_message, and a remediation. The catalog lives in packages/worker/src/reason-codes.ts as an exhaustive Record<ReasonCode, string> — adding a code to shared/src/types.ts without a remediation entry is a compile error, so this table cannot silently fall behind the type.

CodeRemediation
missing_github_tokenConnect the GitHub App to this repository (Settings → GitHub) so Opslane can read and open PRs.
repo_access_deniedConfirm the GitHub App is installed on this repository and has read + pull-request permissions.
token_decrypt_failedRe-connect the GitHub integration — the stored credential could not be decrypted.
auth_invalidRe-authenticate the GitHub connection; the existing token was rejected as invalid.
policy_blockedA repository or org policy blocked the change. Review branch-protection / app permissions, then retry.
missing_llm_keySet the ANTHROPIC_API_KEY environment variable on the worker with a valid Anthropic API key.
CodeRemediation
malformed_diffReview the error manually — the agent could not produce a valid, applicable diff.
verification_failedReview the candidate fix manually — Opslane could not verify it satisfied the failing behavior.
tests_failedReview the candidate diff manually — the agent produced a fix but the test suite still fails, so it may be partial or cause regressions.
low_confidence_fixReview the candidate diff and root-cause writeup, then apply or refine the fix manually — it did not clear the bar for an automatic PR.
budget_exhaustedReview the error manually — the agent could not complete within its turn/budget limits. Consider guiding it with more context.
insufficient_contextAdd a replay, breadcrumbs, or a reproduction so Opslane has enough context to investigate.
CodeRemediation
sourcemap_unresolvedUpload source maps for this release (see the SDK build plugin) so the stack trace resolves to original source.
artifact_fetch_failedRetry later — Opslane could not fetch a stored artifact (screenshot/replay) needed to analyze this error.
CodeRemediation
triage_unfixableReview the error manually — triage determined it cannot be fixed with application code changes.
unfixable_no_app_framesAdd the crossorigin attribute to your <script> tags (with CORS headers) and throw Error objects (not strings) so the SDK captures real stack frames.
unfixable_test_errorNo action needed — this looks like a deliberate test error thrown to exercise Opslane.
unfixable_third_partyReview manually — the error originates entirely in third-party code, so the fix is not in your application source.
unfixable_infraInvestigate infrastructure/network (CORS, DNS, timeouts, 5xx) — this is not an application code bug.
unfixable_no_sourcemapUpload source maps for this release so the minified stack trace resolves to original source, then retry.
CodeRemediation
worker_runtime_errorReview the error manually — the Opslane worker hit an unexpected internal error while processing this incident.
lease_lostNo action needed — the job lease expired mid-run and the incident will be retried automatically.

22 codes total. The drift check fails the repository test gate (pnpm test, which CI runs) if this page and shared/src/types.ts disagree.