> ## Documentation Index
> Fetch the complete documentation index at: https://defi-cli.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Exit Codes

> Stable exit code contract for scripts and agents.

## Stable mapping

| Exit code | Type                      | Meaning                                                          |
| --------- | ------------------------- | ---------------------------------------------------------------- |
| `0`       | success                   | Command succeeded                                                |
| `1`       | internal\_error           | Internal execution error                                         |
| `2`       | usage\_error              | Invalid command or flags                                         |
| `10`      | auth\_error               | Missing/invalid provider key                                     |
| `11`      | rate\_limited             | Provider throttling                                              |
| `12`      | provider\_unavailable     | Provider unavailable                                             |
| `13`      | unsupported               | Unsupported input/provider pair                                  |
| `14`      | stale\_data               | Stale data beyond configured budget                              |
| `15`      | partial\_results          | Partial results with `--strict`                                  |
| `16`      | command\_blocked          | Blocked by `--enable-commands` policy                            |
| `20`      | action\_plan\_error       | Execution plan validation failed                                 |
| `21`      | action\_simulation\_error | Execution simulation failed                                      |
| `22`      | action\_policy\_error     | Execution blocked by safety policy, including OWS policy denials |
| `23`      | action\_timeout           | Execution timed out waiting for chain/provider state             |
| `24`      | signer\_error             | Signer unavailable or signing failed                             |

## Error handling recommendation

* Parse stderr envelope on non-zero exits.
* Branch logic on `error.code`.
* Use retries only for transient types (`11`, `12`).
* For execution commands, treat `23` as potentially recoverable (for example increase `--step-timeout`/`--timeout` and retry).
