> Crysk 0.9.0 docs. Index of every page: https://crysk.dev/llms.txt

# Error codes

What each CRYSK error code means, who fixes it and the exact commands that clear it.

When a review cannot finish, Crysk reports a `CRYSK-*` code on the `crysk` check, in the pull request comment and in the workflow run log. Every message starts with who fixes it: your configuration, the provider, a Crysk defect, or unclassified when Crysk cannot tell and does not guess.

In the commands, `<run-id>` is the number in the workflow run's URL and `<pr-number>` is the pull request number.

| Fixed by | Codes |
|---|---|
| You (your configuration) | [CRED-MISSING](#crysk-cred-missing), [INPUT-REMOVED](#crysk-input-removed), [CRED-UNUSABLE](#crysk-cred-unusable), [CRED-REJECTED](#crysk-cred-rejected), [PROMPTSET-INVALID](#crysk-promptset-invalid), [GOTCHAS-MISSING](#crysk-gotchas-missing), [CONFIG-INVALID](#crysk-config-invalid), [TOKEN-PERMISSION](#crysk-token-permission), [GITHUB-TOKEN-INVALID](#crysk-github-token-invalid), [PR-UNRESOLVED](#crysk-pr-unresolved) |
| The provider or GitHub | [MODEL-UNAVAILABLE](#crysk-model-unavailable), [GITHUB-UNAVAILABLE](#crysk-github-unavailable), [PROVIDER-LIMITED](#crysk-provider-limited), [PROVIDER-UNAVAILABLE](#crysk-provider-unavailable), [PROVIDER-REFUSED](#crysk-provider-refused) |
| Crysk | [ENGINE-DEFECT](#crysk-engine-defect), [RUNTIME-UNAVAILABLE](#crysk-runtime-unavailable) |
| Unclassified: re-run, then report if it repeats | [STATUS-WRITE-FAILED](#crysk-status-write-failed), [INSTALL-FAILED](#crysk-install-failed), [HUNTERS-FAILED](#crysk-hunters-failed), [UNCLASSIFIED](#crysk-unclassified), [CANCELLED](#crysk-cancelled) |

Report a defect at [cryskai/crysk](https://github.com/cryskai/crysk/issues) with the URL of the run.

## CRYSK-CRED-MISSING

**What happened:** No credential for the Claude or OpenCode route reached the action, so Crysk cannot authenticate.

**Fix:** Set one credential for the route you use:

```bash
claude setup-token && gh secret set CRYSK_CLAUDE_OAUTH_TOKEN
gh secret set CRYSK_CLAUDE_API_KEY
gh secret set CRYSK_OPENCODE_<PROVIDER>_API_KEY
```

The first two are the Claude route, the third the OpenCode route. `<PROVIDER>` is the provider id uppercased with `-` and `.` as `_` (`deepseek` is `DEEPSEEK`). If the secret is already set, pass it in the `crysk-secrets` input, one `NAME=value` line per secret, such as `CRYSK_CLAUDE_OAUTH_TOKEN=${{ secrets.CRYSK_CLAUDE_OAUTH_TOKEN }}`. For Dependabot pull requests, also run `gh secret set --app dependabot CRYSK_CLAUDE_OAUTH_TOKEN`. Then `gh run rerun <run-id>`.

## CRYSK-INPUT-REMOVED

**What happened:** The workflow passes inputs Crysk no longer reads (`anthropic-api-key`, `claude-token`, `routing`, `opencode-auth`).

**Fix:** Delete those lines under `with:` and pass the replacements in one `crysk-secrets: |` block:

| Old input | Replacement |
|---|---|
| `claude-token` | secret `CRYSK_CLAUDE_OAUTH_TOKEN` |
| `anthropic-api-key` | secret `CRYSK_CLAUDE_API_KEY` |
| `opencode-auth` | one secret `CRYSK_OPENCODE_<PROVIDER>_API_KEY` per provider your models use |
| `routing` | the `models` input, `models: ${{ vars.CRYSK_MODELS }}` |

```bash
gh variable set CRYSK_MODELS --body '{"default": ["claude:sonnet-latest"]}'
gh run rerun <run-id>
```

## CRYSK-CRED-UNUSABLE

**What happened:** The route for a step has no usable credential. The message says which case.

**Fix:**

- **No record for a provider:** `gh secret set CRYSK_OPENCODE_<PROVIDER>_API_KEY` and pass it in `crysk-secrets`.
- **No Claude subscription record:** `claude setup-token && gh secret set CRYSK_CLAUDE_OAUTH_TOKEN`.
- **No OpenAI credential (`openai`):** `gh secret set CRYSK_OPENCODE_OPENAI_API_KEY`, then list `OPENAI` in `CRYSK_OPENCODE_PROVIDERS` ([steps](https://crysk.dev/docs/github-actions/openai.md)). A ChatGPT plan needs the [Crysk GitHub App](https://crysk.dev/docs/github-actions/openai.md).
- **ChatGPT login expires before the review ends:** the Action cannot renew it. [Set an OpenAI API key](https://crysk.dev/docs/github-actions/openai.md) and stop passing the `_OAUTH` secret, or use the Crysk GitHub App.
- **Store not usable:** re-set the `CRYSK_*` secret the message names. Only `openai` reads an `_OAUTH` secret; for other providers set `_API_KEY`.
- **Anything else:** `gh secret set <secret>`, with the name in the message.

## CRYSK-CRED-REJECTED

**What happened:** The provider rejected the credential in the secret the message names: it is invalid, expired or revoked.

**Fix:** Replace it, then run `gh pr comment <pr-number> --body "/crysk review"`.

| Secret | Replace with |
|---|---|
| `CRYSK_CLAUDE_OAUTH_TOKEN` | `claude setup-token && gh secret set CRYSK_CLAUDE_OAUTH_TOKEN` |
| `CRYSK_CLAUDE_API_KEY` | A new key from the Claude Console, then `gh secret set CRYSK_CLAUDE_API_KEY` |
| `CRYSK_OPENCODE_<PROVIDER>_API_KEY` | A new key from the provider, then `gh secret set` with that name |
| `CRYSK_OPENCODE_OPENAI_OAUTH` | [Set an OpenAI API key](https://crysk.dev/docs/github-actions/openai.md) and stop passing the `_OAUTH` secret |

## CRYSK-MODEL-UNAVAILABLE

**What happened:** The provider does not serve the model configured for a step.

**Fix:** Set a model that provider serves for that role in `models` (with the Crysk GitHub App, in the model settings). List what it serves:

```bash
opencode models <provider>
```

## CRYSK-PROMPTSET-INVALID

**What happened:** An agent file or `PRHERO_EXTRA_HUNTERS` entry cannot be loaded.

**Fix:** Fix the file or `agents_dir`, then check it at no cost:

```bash
crysk review --pr <pr-number> --dry-run
```

## CRYSK-GOTCHAS-MISSING

**What happened:** The review instructions file (`REVIEW.md` or `.crysk/gotchas.md`) is empty or still the scaffold. With no file at all, the review runs on the default guidance.

**Fix:** Write real rules into the file, delete the scaffold marker line if it is there, and commit it to the base branch (comment-triggered runs read the base branch). Or delete the file. See [Write review instructions](https://crysk.dev/docs/reviews/review-instructions.md).

## CRYSK-CONFIG-INVALID

**What happened:** `.crysk/config.json` is invalid, or one of the workflow's `models`, `credentials` or `profile` inputs is. Crysk refuses to guess.

**Fix:** Fix the file and check it with `crysk review --pr <pr-number> --dry-run`. For an input, fix the value and set the variable again, then `gh run rerun <run-id>`:

```bash
gh variable set CRYSK_MODELS --body "$(jq -c . models.json)"
gh variable set CRYSK_CREDENTIALS --body "$(jq -c . credentials.json)"
gh variable set CRYSK_PROFILE --body openai
```

`models` is a JSON object from role to model list. `credentials` is an order such as `{"claude": ["subscription", "api_key"]}`. See [config.json](https://crysk.dev/docs/reference/config.md).

## CRYSK-TOKEN-PERMISSION

**What happened:** The workflow token lacks a write permission, so Crysk cannot post its result on the pull request.

**Fix:** Add `<scope>: write` (the message names it) to the job's `permissions:`, or re-scaffold the workflow:

```bash
crysk ci init --force
```

If the message names no scope (HTTP 403), check that the action step passes `github-token: ${{ secrets.GITHUB_TOKEN }}` and keeps the `permissions:` block `crysk ci init` writes.

## CRYSK-GITHUB-TOKEN-INVALID

**What happened:** The `github-token` input is invalid, so every GitHub API call is rejected.

**Fix:** Set `github-token: ${{ secrets.GITHUB_TOKEN }}` on the action step.

## CRYSK-GITHUB-UNAVAILABLE

**What happened:** The GitHub API failed (the message gives the HTTP status), or its rate limit was reached.

**Fix:** For a server error, re-run the workflow once GitHub is serving again. For a rate limit, wait for it to reset first.

```bash
gh run rerun <run-id>
```

## CRYSK-PR-UNRESOLVED

**What happened:** Crysk could not determine the pull request number or head, so it cannot post anywhere.

**Fix:** Run from a `pull_request` or `issue_comment` event, or pass the `pr-number` input. If you pass it, it must be a positive integer.

## CRYSK-STATUS-WRITE-FAILED

**What happened:** Crysk could not write its commit status, so the required `crysk` check has no result for this commit.

**Fix:** Re-run the failed jobs, and report it if it repeats:

```bash
gh run rerun <run-id> --failed
```

If the message names a permission problem, add `statuses: write` to the job's `permissions:` or run `crysk ci init --force`. If GitHub failed, re-run the workflow once it accepts commit statuses again.

## CRYSK-RUNTIME-UNAVAILABLE

**What happened:** A runtime Crysk depends on is unusable.

**Fix:** In GitHub Actions the action installs it, so this is a Crysk defect. Report it with the run:

```bash
gh issue create -R cryskai/crysk --title "CRYSK-RUNTIME-UNAVAILABLE" --body "<run-url>"
```

On your machine, a tool is missing from your environment:

```bash
crysk upgrade --reconcile
```

## CRYSK-INSTALL-FAILED

**What happened:** A download or install step failed, and Crysk cannot tell which external cause it was.

**Fix:** Re-run only the failed jobs, and report it if it repeats:

```bash
gh run rerun <run-id> --failed
```

## CRYSK-PROVIDER-LIMITED

**What happened:** The provider throttled the account or key, or its quota or credit ran out. An immediate retry fails the same way.

**Fix:** Wait for the reset or raise the quota, then run `gh pr comment <pr-number> --body "/crysk review"`. By credential:

- **Claude API key, no credit:** add credit in the Claude Console, or set `CRYSK_CLAUDE_OAUTH_TOKEN` and keep `subscription` first in `credentials.claude` (the default).
- **Claude subscription limit:** wait for the reset time in the message, or set `CRYSK_CLAUDE_API_KEY` and put `api_key` first in `credentials.claude`.
- **OpenCode API key:** add credit on that provider account, or `gh secret set <secret>` with a key from another one.
- **ChatGPT subscription:** wait, or [set an OpenAI API key](https://crysk.dev/docs/github-actions/openai.md) and stop passing the `_OAUTH` secret.

## CRYSK-PROVIDER-UNAVAILABLE

**What happened:** The request to the provider did not complete, and the outcome cannot be confirmed from here.

**Fix:**

```bash
gh run rerun <run-id>
```

## CRYSK-PROVIDER-REFUSED

**What happened:** The provider's safety system declined the input.

**Fix:** Ask for a new review once with `gh pr comment <pr-number> --body "/crysk review"`. If the provider refuses again, report it.

## CRYSK-ENGINE-DEFECT

**What happened:** Crysk hit an internal error. It is a defect in Crysk, not in your configuration.

**Fix:** Report it with the run. The message gives the `<detail>`:

```bash
gh issue create -R cryskai/crysk --title "CRYSK-ENGINE-DEFECT <detail>" --body "<run-url>"
```

## CRYSK-HUNTERS-FAILED

**What happened:** Every hunter (review agent) failed, so there is no finding to report. The pull request was not reviewed.

**Fix:** Re-run the failed jobs, and report it if it repeats:

```bash
gh run rerun <run-id> --failed
```

If the message says the input exceeded the model's context window, a re-run sends the same request. Lower `max-changed-lines` in the workflow's `with:` block, or exclude paths in `.cryskignore`, then run `/crysk review`. See [Exclude files](https://crysk.dev/docs/reviews/exclude-files.md).

## CRYSK-UNCLASSIFIED

**What happened:** Crysk stopped at a step and could not tell why. Rather than guess, it says so.

**Fix:** Re-run the failed jobs. If it repeats, read the log and report it:

```bash
gh run rerun <run-id> --failed
gh run view <run-id> --log-failed
```

## CRYSK-CANCELLED

**What happened:** The review was cancelled or superseded by a newer push, so its result would describe an outdated commit. This is a notice, not a failure.

**Fix:** Nothing, unless you need a review of the current commit:

```bash
gh pr comment <pr-number> --body "/crysk review"
```
