JSON output
Read process status, output streams and command outcomes separately.
alicli threads list --json
{"success":true,"data":[],"error":null,"code":null}
{"success":false,"data":null,"error":"example refusal","code":null}Streams
Handled successes write one JSON envelope to stdout. Handled failures write an envelope to stderr. Progress also goes to stderr, so stderr may contain progress lines before the failure envelope. Follow mode emits progress rather than a single completed result. Startup and some uncaught errors can be plain stderr text; always check the process exit status.
| Field or option | Meaning |
|---|---|
success | Whether the command returned its successful result shape, not a blanket proof that an external action completed. |
data / error | Result data on success, error string on a handled failure. |
code | device_busy, task_cancelled, or null under the current text-based classifier. Null does not mean harmless. |
deviceTaskIds | Optional IDs when the run created vendor tasks. Normally absent on the current deterministic paths. |
Do not retry on envelope shape alone
Send and contact can return success:true with outcome:"unknown". Read the outcome and verify the actual thread before another attempt. Likewise, a successful cached search read may have coverage:"never_captured". Doctor/watchdog can return a valid data envelope with a nonzero diagnostic exit code.
Related
send · search api · watchdog