9. Output, errors and exit codes

Human output is short and stable.

Human output is short and stable. With --json, every command prints one JSON document. For tools this is the MCP content array; for native commands, the command’s result schema. Errors go to standard error. With --json they are an object:

json
{ "error": { "code": "not_found", "message": "No node matches \"Home/Header/Logo\".", "hint": "Run ud tree --depth 2 to see the page." } }

A sub-code, when there is one, is a subcode field next to code; in human output it follows the code in parentheses: usage (not_allowed_in_proposal).

Exit Code When
0 ok Done.
1 command_error The command or script failed; nothing was applied. Also lint errors. Over MCP two more codes exit 1: busy (mutation queue full) and stopped (the user stopped the agent), AI-001.
2 usage Unknown command or parameter, invalid value, ambiguous target. Sub-code not_allowed_in_proposal: a command flagged writesFiles or network, or a URL input, under ud mcp --proposal (section 8.1); sub-code not_allowed: a tool outside --allow or --read-only.
3 conflict --if-version mismatch, or the file is locked for longer than --wait (default 10 s).
4 licence A change needs a paid plan or the trial. Wired from 0.1; until 1.0 the licence provider always answers “paid” (section 2.5).
5 not_found File, node, style, variable or component not found.
6 unsupported A Figma tool, editor type or Plugin API member UI Designer does not offer.