> ## 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.

# Output and errors

> Use command output, JSON results, and stable exit codes in shell scripts.

## Default output

`tab open` prints the created tab ID:

```console theme={"theme":{"light":"github-light","dark":"github-dark"}}
$ radius tab open https://example.com
tab_42
```

This makes IDs easy to capture:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
tab="$(radius tab open https://example.com)"
radius tab focus "$tab"
```

Other successful mutations are silent by default. Query commands print
human-readable output.

## JSON output

Add `--json` when a script or agent needs structured output:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
radius tab open https://example.com --json
```

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "tab_42",
  "tabId": "tab_42",
  "workspaceRevision": 92
}
```

For concurrency guards and event-oriented output, see
[JSON and concurrency](/docs/advanced/json-and-concurrency).

## Errors

Human-readable errors are written to stderr:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
TAB_NOT_FOUND: Tab tab_42 is not live
```

With `--json`, stderr contains a machine-readable error:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "error": {
    "code": "TAB_NOT_FOUND",
    "message": "Tab tab_42 is not live"
  }
}
```

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.
