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
| Code | Meaning |
|---|---|
missing_command | unsnag was run without a command. |
unknown_command | No such command; the hint suggests the closest one. |
unknown_option | The command doesn't take this flag. |
missing_argument | A required argument, or a flag's value, is missing. |
missing_option | A required flag is missing. |
too_many_arguments | The command was given more arguments than it takes. |
invalid_argument | An argument's value isn't one the command accepts. |
conflicting_options | Two flags that can't be combined were both given. |
invalid_usage | The command line couldn't be parsed for another reason. |
internal_error | A bug in Unsnag; please report it. |
no_benchmark | No unsnag/benchmark.yaml was found upward from here, or --config doesn't point at one. |
benchmark_exists | unsnag init found an unsnag/benchmark.yaml already, and never overwrites it. |
invalid_config | The Benchmark or a Scenario is invalid; errors lists every problem with its file, line, column, key path and hint. |
no_scenarios | unsnag run found no Scenarios to run in the Scenario folder. |
unknown_scenario | No Scenario has this id (for unsnag scenarios accept, no Draft Scenario). |
scenario_exists | unsnag scenarios accept found a Scenario with the draft's id already, and never overwrites it. |
unsupported_agent | The Agent's harness isn't one Unsnag supports. |
missing_secret | A name listed in secrets: isn't set in the environment. |
unknown_selector | A --scenario, --tag, --agent or --context names nothing in the Benchmark; the hint suggests the closest. |
empty_selection | The selectors leave nothing to run. |
nothing_failed | unsnag run --failed found no failing Run in that Report. |
nothing_uncovered | unsnag draft --uncovered found no command or flag that no Reference Solution uses. |
over_budget | The Report's hard cost ceiling is above its budget, so unsnag run didn't start. |
verify_failed | A selected Scenario failed verify, so unsnag run started no Runs; the message names each and why. |
docker_unavailable | Docker isn't installed, isn't on PATH, or its daemon isn't running. |
docker_failed | A Docker command Unsnag needed (creating a network, starting a container or sidecar, copying files) failed; the message has Docker's reason. |
sandbox_failed | Preparing a sandbox (copying files in, making the workspace) failed; the message has the reason. |
service_not_ready | A service's container didn't start, or didn't pass its ready probe in time. |
setup_failed | A Scenario's setup exited nonzero. |
base_image_failed | Unsnag's base image couldn't be pulled (a released Unsnag) or built (Unsnag built from source). |
install_failed | An install step, or the build of the dockerfile, failed while building the Benchmark's image. |
cli_not_found | After install (or the dockerfile), the Target CLI (cli:) isn't on PATH in the image. |
dockerfile_not_on_base | The dockerfile doesn't start FROM ${UNSNAG_BASE}, Unsnag's base image. |
agent_image_failed | Building the image of the explainer's or drafter's harness failed. |
relay_image_failed | Building the model relay's image failed. |
dns_image_failed | Building the DNS resolver's image failed. |
proxy_image_failed | Building the web proxy's image (hosted mode) failed. |
service_image_failed | A service's image couldn't be pulled. |
service_build_failed | A service's build Dockerfile failed to build. |
no_api_key | There is no OpenRouter key: set OPENROUTER_API_KEY or run unsnag key set. |
empty_key | unsnag key set was given no key, at its prompt or on stdin. |
invalid_api_key | OpenRouter rejected the key. |
provider_unavailable | The model's pinned provider doesn't serve it right now; relay.providers can name another. |
model_call_failed | A model call through OpenRouter failed. |
openrouter_unreachable | OpenRouter couldn't be reached. |
report_not_found | No stored Report matches the reference. |
ambiguous_report | The id prefix matches more than one stored Report. |
report_unreachable | The .tar.gz URL of a Report couldn't be downloaded. |
invalid_report | The downloaded archive isn't a Report folder. |
report_running | The Report is still running, so it can't be analyzed or pushed yet. |
report_abandoned | The process running the Report died before it finished. |
idle_cpu | In 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. |
cancelled | The 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_use | unsnag report --serve couldn't listen on the --port: something else already does. |
serve_failed | unsnag report --serve couldn't listen on the --host and --port, for a reason other than the port being in use. |
not_logged_in | The machine has no token for the Project's Organization: run unsnag login, or set UNSNAG_TOKEN. |
invalid_token | The App doesn't know the token: the login was unlinked or the CI token revoked, or UNSNAG_TOKEN is wrong. |
login_denied | unsnag login was refused in the App. |
login_expired | unsnag login wasn't approved in the App within ten minutes. |
not_linked | The command needs a folder linked to a Project (unsnag link <organization>/<project>), and this one isn't. |
project_not_found | The App has no such Project, or the token can't reach it. |
benchmark_in_app | The command reads the Benchmark's files, and this folder is linked to a Project, whose Benchmark is in the App. |
no_benchmark_version | The linked Project has no Benchmark yet: write it in the App, or send a folder's with unsnag import. |
app_unreachable | The App's API, or its file storage, couldn't be reached. |
app_refused | The App's API refused a request; the message has its reason. |
Warnings
A warning never changes the exit code.
| Code | Meaning |
|---|---|
no_name_only | The Benchmark declares Context Conditions but not name-only, the reference point without any Context Inputs. |
no_scenarios | The Scenario folder has no Scenario files yet. |
no_solution | A Scenario has no Reference Solution, so verify can't prove it fair and solvable; unsnag run runs it anyway. |
no_command_tree | No Command Tree has been crawled yet, so unsnag scenarios shows no command coverage and the lint checks only flags and skills. |
version_failed | The Benchmark's version command failed, so the Report records no Target CLI version. |
no_api_key | unsnag analyze has no OpenRouter key, so the Findings aren't merged, labelled or explained. |
key_overridden | OPENROUTER_API_KEY is set, so it is used instead of the key unsnag key set stored. |
html_failed | The HTML Report couldn't be written; report.json is complete. |
open_failed | No browser could be opened for the HTML Report. |
draft_budget | The draft budget ran out; the drafts that already pass verify are kept. |
draft_cancelled | unsnag draft was interrupted; the drafts that already pass verify are kept. |
drafter_failed | The drafter failed in one of its rounds. |
doc_unreachable | A URL in draft.docs couldn't be fetched, so the drafter doesn't see it. |
revoke_failed | unsnag logout removed a login from this machine, but couldn't revoke it at the App. |
token_overridden | UNSNAG_TOKEN is set, so it is used instead of the login unsnag login stored. |
benchmark_file_unused | The 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_failed | The 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:
| Code | Meaning |
|---|---|
runner_failed | The Runner couldn't do a drafting or verify job: fetching the source or starting the engine failed; the message has why. |
engine_failed | The engine ended a drafting or verify job without saying what came of it. |
secret_use | The Benchmark lists under run a secret an owner made a build secret, so the Runner refused the job before anything ran. |