> ## Documentation Index
> Fetch the complete documentation index at: https://radiusbrowser.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors and exit codes

> Handle Radius CLI failures with stable error codes and process exit statuses.

When a command fails, Radius writes a human-readable error to stderr and exits
with a non-zero status:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
RADIUS_NOT_RUNNING: Radius is not running
```

Add `--json` to receive the error as a structured object:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "error": {
    "code": "RADIUS_NOT_RUNNING",
    "message": "Radius is not running"
  }
}
```

## Common errors

Common errors include:

| Error                | Meaning                                        |
| -------------------- | ---------------------------------------------- |
| `RADIUS_NOT_RUNNING` | Radius is not running or ready.                |
| `INSTANCE_AMBIGUOUS` | More than one Radius instance is running.      |
| `WINDOW_NOT_FOUND`   | The window is no longer available.             |
| `GROUP_NOT_FOUND`    | The group is no longer available.              |
| `TAB_NOT_FOUND`      | The tab is no longer available.                |
| `INVALID_SPLIT`      | The requested split cannot be created.         |
| `COMMAND_TIMEOUT`    | The command did not finish before its timeout. |
| `INVALID_REQUEST`    | The command or its arguments are invalid.      |

## Exit codes

| Status | Meaning                                  |
| ------ | ---------------------------------------- |
| `0`    | Success                                  |
| `1`    | Runtime or command failure               |
| `2`    | Invalid command or arguments             |
| `3`    | Window, group, or tab not found          |
| `4`    | Revision or command conflict             |
| `5`    | Connection or instance-selection failure |

Scripts should branch on the exit status or error code rather than parsing the
message text.
