Error Handling
When a command fails, the CLI returns a non-zero exit code. If you’re using--json or --agent output mode, the envelope’s ok field is false and the summary field contains the error message.
Error envelope
Common errors
Checking for errors in scripts
When scripting, always check the exit code or parse the envelope:Diagnostics
If you’re unsure why commands are failing, run diagnostics:- Whether credentials are stored and valid.
- Whether the API is reachable.
- Whether the CLI is up to date.