Skip to content
vxvx
GitHubBlueskydev.toRSS
Blog

A refusal an agent can read

Under --format json, a refusal is now a JSON line with a stable code. An agent branches on VX_E_UNKNOWN_TASK, not on the wording of a sentence.

An agent that runs vx run build --format json reads stdout. When vx refused the run, stdout used to be empty, and the reason sat on stderr as prose. Now the refusal is on stdout too, as one JSON line:

Terminal window
$ vx run biuld --all --format json
{"ok":false,"error":{"code":"VX_E_UNKNOWN_TASK","message":"vx run: no projects declare task(s): biuld. Did you mean build?"}}

The exit code is still 1 and stderr still says it in words. The code is the contract; the message may change.

CodeMeans
VX_E_USAGEA flag or argument vx does not take
VX_E_UNKNOWN_TASKNo project declares the task
VX_E_CONFIGA config that does not load
VX_E_CYCLEThe task graph has a cycle
VX_E_NO_WORKSPACENo workspace above the working directory
VX_E_REFUSEDAny other refusal
VX_E_INTERNALA bug in vx

schemas/error.json describes the line, and the full table is in the CLI reference.

Turborepo, Nx and other product names are trademarks of their owners. vx is not affiliated with or endorsed by them.