Skip to content
Unsnag

Errors and warnings

Every error and warning has a stable snake_case code, a one-line message and a hint that says what to do next. With --json, a failure prints {"error": {code, message, hint}} and exits 1; warnings are listed in warnings of the result, [{code, message, hint?}]. Without it, both go to stderr.

Errors

CodeMeaning
missing_commandunsnag was run without a command.
unknown_commandNo such command; the hint suggests the closest one.
unknown_optionThe command doesn't take this flag.
missing_argumentA required argument, or a flag's value, is missing.
missing_optionA required flag is missing.
too_many_argumentsThe command was given more arguments than it takes.
invalid_argumentAn argument's value isn't one the command accepts.
conflicting_optionsTwo flags that can't be combined were both given.
invalid_usageThe command line couldn't be parsed for another reason.
internal_errorA bug in Unsnag; please report it.
no_benchmarkNo unsnag/benchmark.yaml was found upward from here, or --config doesn't point at one.
benchmark_existsunsnag init found an unsnag/benchmark.yaml already, and never overwrites it.
invalid_configThe Benchmark or a Scenario is invalid; errors lists every problem with its file, line, column, key path and hint.
no_scenariosunsnag run found no Scenarios to run in the Scenario folder.
unknown_scenarioNo Scenario has this id (for unsnag scenarios accept, no Draft Scenario).
scenario_existsunsnag scenarios accept found a Scenario with the draft's id already, and never overwrites it.
unsupported_agentThe Agent's harness isn't one Unsnag supports.
missing_secretA name listed in secrets: isn't set in the environment.
unknown_selectorA --scenario, --tag, --agent or --context names nothing in the Benchmark; the hint suggests the closest.
empty_selectionThe selectors leave nothing to run.
nothing_failedunsnag run --failed found no failing Run in that Report.
nothing_uncoveredunsnag draft --uncovered found no command or flag that no Reference Solution uses.
over_budgetThe Report's hard cost ceiling is above its budget, so unsnag run didn't start.
verify_failedA selected Scenario failed verify, so unsnag run started no Runs; the message names each and why.
docker_unavailableDocker isn't installed, isn't on PATH, or its daemon isn't running.
docker_failedA Docker command Unsnag needed (creating a network, starting a container or sidecar, copying files) failed; the message has Docker's reason.
sandbox_failedPreparing a sandbox (copying files in, making the workspace) failed; the message has the reason.
service_not_readyA service's container didn't start, or didn't pass its ready probe in time.
setup_failedA Scenario's setup exited nonzero.
base_image_failedUnsnag's base image couldn't be pulled (a released Unsnag) or built (Unsnag built from source).
install_failedAn install step, or the build of the dockerfile, failed while building the Benchmark's image.
cli_not_foundAfter install (or the dockerfile), the Target CLI (cli:) isn't on PATH in the image.
dockerfile_not_on_baseThe dockerfile doesn't start FROM ${UNSNAG_BASE}, Unsnag's base image.
agent_image_failedBuilding the image of the explainer's or drafter's harness failed.
relay_image_failedBuilding the model relay's image failed.
dns_image_failedBuilding the DNS resolver's image failed.
proxy_image_failedBuilding the web proxy's image (hosted mode) failed.
service_image_failedA service's image couldn't be pulled.
service_build_failedA service's build Dockerfile failed to build.
no_api_keyThere is no OpenRouter key: set OPENROUTER_API_KEY or run unsnag key set.
empty_keyunsnag key set was given no key, at its prompt or on stdin.
invalid_api_keyOpenRouter rejected the key.
provider_unavailableThe model's pinned provider doesn't serve it right now; relay.providers can name another.
model_call_failedA model call through OpenRouter failed.
openrouter_unreachableOpenRouter couldn't be reached.
report_not_foundNo stored Report matches the reference.
ambiguous_reportThe id prefix matches more than one stored Report.
report_unreachableThe .tar.gz URL of a Report couldn't be downloaded.
invalid_reportThe downloaded archive isn't a Report folder.
report_runningThe Report is still running, so it can't be analyzed or pushed yet.
report_abandonedThe process running the Report died before it finished.
idle_cpuIn the hosted mode (a Report on a machine of Unsnag's), a Run's Agent kept its CPU busy for twelve minutes without calling its model, so the Report was ended: a hosted machine is for Agents at work, not for mining. The Runs that finished are kept.
cancelledThe command was interrupted (Ctrl-C, SIGINT or SIGTERM). A Report keeps the Runs that finished and drops the Runs under way; unsnag scenarios verify keeps the results it had.
port_in_useunsnag report --serve couldn't listen on the --port: something else already does.
serve_failedunsnag report --serve couldn't listen on the --host and --port, for a reason other than the port being in use.
not_logged_inThe machine has no token for the Project's Organization: run unsnag login, or set UNSNAG_TOKEN.
invalid_tokenThe App doesn't know the token: the login was unlinked or the CI token revoked, or UNSNAG_TOKEN is wrong.
login_deniedunsnag login was refused in the App.
login_expiredunsnag login wasn't approved in the App within ten minutes.
not_linkedThe command needs a folder linked to a Project (unsnag link <organization>/<project>), and this one isn't.
project_not_foundThe App has no such Project, or the token can't reach it.
benchmark_in_appThe command reads the Benchmark's files, and this folder is linked to a Project, whose Benchmark is in the App.
no_benchmark_versionThe linked Project has no Benchmark yet: write it in the App, or send a folder's with unsnag import.
app_unreachableThe App's API, or its file storage, couldn't be reached.
app_refusedThe App's API refused a request; the message has its reason.

Warnings

A warning never changes the exit code.

CodeMeaning
no_name_onlyThe Benchmark declares Context Conditions but not name-only, the reference point without any Context Inputs.
no_scenariosThe Scenario folder has no Scenario files yet.
no_solutionA Scenario has no Reference Solution, so verify can't prove it fair and solvable; unsnag run runs it anyway.
no_command_treeNo Command Tree has been crawled yet, so unsnag scenarios shows no command coverage and the lint checks only flags and skills.
version_failedThe Benchmark's version command failed, so the Report records no Target CLI version.
no_api_keyunsnag analyze has no OpenRouter key, so the Findings aren't merged, labelled or explained.
key_overriddenOPENROUTER_API_KEY is set, so it is used instead of the key unsnag key set stored.
html_failedThe HTML Report couldn't be written; report.json is complete.
open_failedNo browser could be opened for the HTML Report.
draft_budgetThe draft budget ran out; the drafts that already pass verify are kept.
draft_cancelledunsnag draft was interrupted; the drafts that already pass verify are kept.
drafter_failedThe drafter failed in one of its rounds.
doc_unreachableA URL in draft.docs couldn't be fetched, so the drafter doesn't see it.
revoke_failedunsnag logout removed a login from this machine, but couldn't revoke it at the App.
token_overriddenUNSNAG_TOKEN is set, so it is used instead of the login unsnag login stored.
benchmark_file_unusedThe folder is linked to a Project, so unsnag run ran the Project's Benchmark from the App, not the unsnag/benchmark.yaml in the folder.
upload_failedThe Report couldn't be put in the App; it is complete in its folder, and unsnag push sends it.

A job in the App

A drafting or verify job the App ran that failed carries one of the errors above, or one of the Runner's own:

CodeMeaning
runner_failedThe Runner couldn't do a drafting or verify job: fetching the source or starting the engine failed; the message has why.
engine_failedThe engine ended a drafting or verify job without saying what came of it.
secret_useThe Benchmark lists under run a secret an owner made a build secret, so the Runner refused the job before anything ran.