Skip to content

Error and exit codes

Hostwright returns structured diagnostics for command, validation, state, runtime, confirmation, and safety failures. Exact codes can vary by command family and development build. See the core error-code reference for the current code table.

When a command supports JSON output, a classified CLI failure uses a bounded error envelope on stderr:

{"code":"HW-CLI-001","exitCode":64,"kind":"error","message":"..."}

Common process outcomes include success, usage or validation error, unavailable state/runtime, stale confirmation, unsafe operation, and partial failure. hostwright doctor --output json reports compatibility failures in its normal report document with hasFailures: true.

Use hostwright help and the exact installed build’s command output when handling errors in scripts. Do not infer that a command is safe to retry after an interrupted or ambiguous lifecycle result; inspect recovery state first.