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

# JSON and concurrency

> Build reliable scripts and agents with structured output and revision guards.

Most shell scripts can use the default human-readable output. Use `--json`
when a program or agent needs structured data.

## Structured results

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
radius tab list --json
```

A workspace snapshot includes the active tab, tab and group records, display
order, split layout, and a `workspaceRevision`.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "workspaceRevision": 92,
  "activeTabId": "tab_14",
  "displayOrder": ["tab_12", "tab_14", "tab_13"]
}
```

Mutation results identify the changed resource and the resulting workspace
revision:

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

## Revision guards

Use `--if-workspace-revision` when a command must apply to the same workspace
state that your program inspected:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
radius tab focus tab_14 --if-workspace-revision 92 --json
```

If another command changed the workspace first, Radius returns
`REVISION_CONFLICT` without applying the mutation.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "error": {
    "code": "REVISION_CONFLICT",
    "message": "The workspace changed before the command could run"
  }
}
```

Revision guards are optional. They are most useful for agents and concurrent
automation; ordinary startup scripts generally do not need them.

## Timeouts

Set a timeout in milliseconds:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
radius tab wait tab_42 --load --timeout-ms 30000
```

A timeout returns `COMMAND_TIMEOUT` and does not retarget the command.

## Stable automation boundary

Scripts should depend on documented IDs, fields, error codes, and command
semantics. Transport details and browser-engine state are intentionally not
part of the public automation contract.
