Skip to main content
Every failure Sponson reports carries a stable code. In --json output and MCP results it is error.code of the envelope ({ ok: false, command, error: { code, message, hint? } }) when the command could not run, and errorCode on a plan line or receipt line when one line failed. Branch on the code, never on the message. When a command stops on an error, the code decides the exit code (the Exit column). When it runs to the end, line failures are reported in its output and the exit code is 1. hint (the CLI hint column) is the command-line remedy, appended to the message in text output and present as error.hint in JSON. ok in the envelope is true exactly when the exit code is 0.

Exit codes

Codes

Warnings

Warning codes never fail a run and have no exit code.

Adding a code

Add it to ERROR_CODES in packages/core/src/errors.ts with its exit code, a doc line and, when the CLI has a remedy, a cliHint; then run pnpm docs:gen and commit the regenerated docs/errors.md.