Skip to main content
SmithersErrorInstance is a typed, code-bearing Error subclass used throughout Smithers internals. It surfaces when runWorkflow throws, in NodeFailed events emitted during execution, and as JSON in HTTP API error responses. The imports below are the full error utility surface.
build agent command: undefined is not an object (evaluating 'schema._zod.def'): your task output schema is a Zod v3 object; Smithers reads schema metadata via Zod v4 internals (_zod.def). Install Zod v4 (bun add zod@^4) and import z from it. Deterministic configuration error: re-running won’t fix it.
Every built-in SmithersErrorInstance carries three pieces of documentation metadata: Use KnownSmithersErrorCode for an exhaustive switch over built-in Smithers codes. SmithersErrorCode includes the (string & {}) escape hatch for user-defined custom codes.

Engine

Components

Tools

Agents

Database

Migration errors

smithers migrate preserves the source SQLite store by default: if the legacy smithers.db can’t be copied into the target backend, Smithers leaves the original file untouched and reports the first actionable failure. Corrupt, malformed, encrypted, or non-SQLite source files surface as DB_QUERY_FAILED with the source dbPath in details; the message tells you to verify the file with sqlite3 <dbPath> 'PRAGMA integrity_check' and restore from backup or start fresh if SQLite confirms corruption. Source files that exist but can’t be opened also surface as DB_QUERY_FAILED, pointing at common operational causes: another process holding the file, unreadable permissions, or a copied SQLite file missing its smithers.db-wal / smithers.db-shm sidecars. For Postgres migrations, smithers migrate --to postgres validates the target connection string before opening the source store: a missing --url, SMITHERS_POSTGRES_URL, or DATABASE_URL fails fast with INVALID_INPUT, so connection setup problems aren’t hidden behind unrelated source-store errors.

Effect / Runtime

Hot Reload

Scorers

CLI

Integrations

Unknown legacy account providers are tolerated entry-by-entry. For example, an old "provider": "gemini" subscription is skipped with a warning naming the account label and valid providers, while the remaining valid accounts still load. Such an entry is left out of the active account list but preserved verbatim in accounts.json across later agents add and agents remove calls, so an unrelated change never destroys the credentials its configDir points at. Run bunx smthrs agents remove <label> to delete it, or bunx smthrs agents add --label <label> --replace ... to migrate it onto a supported provider. ACCOUNTS_FILE_INVALID is reserved for invalid JSON or entries whose known provider shape is malformed.

HTTP API Errors

JSON response codes, not SmithersErrorInstance objects.