Evals

Errors

Every evals.* error code, when it is raised, and what to do about it.

Every error Viewport Evals raises extends Viewport Core's ViewportError, carries a stable code, and has the same code and message in both languages. Classes: ViewportEvalsError for most codes, FixtureError for fixture problems, ConfigError for config and agent lookup, CaseLoadError (a core SpecError) for invalid case files. TypeScript also has ReplayMissError for a request the recording cannot answer.

A code can reach you two ways. Thrown: from trace(), t.called, t.meets or a config load, as an exception. In a verdict: when the runner cannot evaluate a case, its status is error and verdict.error holds { code, message }. Either way the CLI exits 1 for a case error and 2 for a usage or config error.

CodeWhenWhat to do
evals.case_invalida case file or an inline expect block fails validation: unknown key, wrong type, bad matcher. Issues carry file, line, column and a did-you-meanfix the key; viewport-evals validate lists every issue
evals.invariant_invalidan invariant (inline, in a policy file or in code) fails invariant/v1: no operator, duplicate name, bad path, glob or duration. Raised as InvariantLoadErrorfix the invariant; validate also prints warnings such as an after without same
evals.config_invalidan unknown or ill-typed config key, a bad VIEWPORT_EVALS_* value, an unknown reporter, or a Trace entered twicethe message names the key or variable
evals.agent_not_founda case names an unregistered agent, no agent is registered, or several are and the case names noneregister the agent, or add agent: to the case
evals.world_not_founda case's world: { name: { use } } names neither a configured world nor a packregister it under worlds in config; the message lists the known names
evals.world_invalida world's name, state or seed is not valid: state must be a JSON objectfix the definition or the seed
evals.world_faulta world tool raised something other than WorldError. The call was rolled back and the test fails, because it is a bug in the toolfix the tool, or raise WorldError for errors the model should see
evals.fixture_missingreplay or rescore with no fixture, or a replaying trace() that calls a model with no recordingrecord locally (auto, or --mode record) and commit the fixture
evals.fixture_stalein CI, the fixture's case_hash no longer matches the case's input, agent or runs, or it has fewer runs than the case asks forre-record with --rerecord
evals.fixture_invalida fixture file is not valid JSON or not evals/fixture/v1re-record it; do not hand-edit exchanges
evals.recording_missin replay, a model request matches no recorded exchange. The message shows a diff against the closest one. The Claude Agent SDK proxy reports it in an x-viewport-error headerre-record after an intended change; otherwise the diff shows what drifted
evals.replay_blockedin replay, the agent opened a connection with no recording to a host not in replay.allow_hosts (any transport: fetch, node:http, sockets, httpx, requests, boto3). The case errors even if the agent caught ReplayBlockedError; the verdict and report count blockeda model provider: add its host to replay.hosts (or wrap() the client) and re-record; your own service: add it to replay.allow_hosts, or fake it
evals.recording_unusedTypeScript ReplaySession.assertConsumed() found recorded exchanges the run never requestedre-record, or check why the agent made fewer calls
evals.replay_proxy_upstreamthe replay proxy for a child process could not reach the real provider while recording (sent as the x-viewport-error header of a 502)check the network and the provider's base URL
evals.replay_tool_misswith replay: { tools: recorded }, the agent called a tool with arguments the imported trace never saw, and on_miss is erroran intended change: set on_miss: world or live, or re-import; otherwise it is the regression
evals.nothing_captureda trajectory assertion or t.called ran on a trace with no model or tool call, so a negative check could pass by accident. The message suggests the likely causewrap the client or install the adapter for your stack; set allow_empty for code that calls no model
evals.judgment_missinga judge matcher needs a verdict that is not cached in the fixture, in replay or rescore, where judges are never calledrun locally in auto to cache it, commit the fixture
evals.judge_invalidan llm_judge / llmJudge completion did not answer with {"passed", "score", "reason"} JSONfix the judge prompt or model
evals.judge_needs_asyncPython only: t.meets (sync) needed a judge that awaits IOuse await t.ameets(...)
evals.plugin_not_founda use: entry names a plugin not registered in the running language. The message says where to register itregister the plugin in this language too
evals.plugin_options_invalidan assertion plugin's options failed its schemafix the options in the case's use: entry
evals.unpriced_modelt.usage.cost_usd was read for a model the price table does not know. In a case, budget.cost_usd fails with the same message insteadadd the model under pricing in config, or report usage.cost_usd
evals.simulated_time_exceededa run on a simulated clock passed max_simulated (default 30 days), usually a runaway intervalfind the timer that keeps rescheduling, or raise clock.max_simulated
evals.clock_unsupportedTypeScript: a simulated clock was asked to patch Date or timers while vitest fake timers are oncall vi.useRealTimers() in that test
evals.import_invalidviewport-evals import got a source it cannot read: an unknown format, a malformed export, JSON nested deeper than 128 levels, an invalid trace idcheck the file or id
evals.import_failedfetching a trace from Langfuse, LangSmith or Braintrust failed: missing keys, auth, networkthe message names the variable or the HTTP status
evals.export_faileda score exporter failed under --strict-export (without it, the failure prints one line and the run continues)check the platform's keys and URL
evals.results_lockedthe results directory's index lock is held by another process past the waitretry; remove a stale lock left by a killed process
evals.script_exhausteda scripted model or fake judge was asked for more than it was given, or assert_consumed / assertConsumed found turns left over. The message shows the unexpected requestadd the missing turn, or remove the extra one
evals.run_failedthe runner hit an unexpected error outside your agent while running a casereport it; the message has the cause

A run that exceeds timeout_ms is aborted and recorded with error type TimeoutError, and a tool call the framework rejected (unknown tool, invalid arguments) is a tool_call whose error.type is invalid_tool_call. Both are trajectory errors, asserted like any other, not Evals error codes.

Errors from your agent

An exception in your agent is not an Evals error. It becomes the trajectory's error (type and message). By default error: false applies, so the run fails with a single error assertion, agent failed: <type>: <message>, and the other assertions are skipped, so a crash is never buried under secondary failures. Assert on expected failures with error: true or error: { type: ..., message: ... }. retries re-runs a crashed run when the case does not expect an error.

On this page