Fetch the complete documentation index at https://www.nativecluster.com/llms.txt

# Why isn't NativeCluster working?

> Start with `nativecluster doctor`: with no sign-in it says whether NativeCluster runs on this Mac and which of its ports listen; signed in, it also names the main this Mac is joined to. Then use the command's exit code and `next` word, or the API's error code, to find the fix below.

## Start here

```sh
nativecluster doctor
nativecluster status
```

| `doctor` says | Do this |
|---|---|
| NativeCluster is not running on this Mac. | Open NativeCluster from Applications. `doctor` exits 4 until then. |
| NativeCluster runs on this Mac; this terminal is not signed in (nativecluster login). | Run `nativecluster login`; the person signs in in their browser. On a Mac an agent set up, `login` signs the agent in with no browser. On a Mac nobody has set up, an AI agent runs `nativecluster setup --accept-terms` instead, its person there or not (since 0.4.21; since 0.4.23 every command says so there, `next: setup`). `doctor` exits 3 until then. |
| NativeCluster … answers on this Mac, signed in. | The Mac is ready. |
| This Mac is offline (Settings › Account) | It works offline on purpose: **Reconnect** in Settings › Account, This Mac. |
| Warning: … can be read by others on this Mac | Run `nativecluster logout`, then `nativecluster login`. |

## The command isn't found

- Choose **Install the nativecluster command…** in NativeCluster's menu bar menu, then open a **new** terminal window: a window that was already open doesn't see the change. After the install line, the same: open a new terminal window, or call `~/.local/bin/nativecluster`.
- Or call it by its full path: `/Applications/NativeCluster.app/Contents/Resources/nativecluster`.

## `nativecluster` alone, or with a flag, started something else

`nativecluster` with no command, or with a first word starting with `-` other than `--help` and `-h`, starts NativeCluster itself, not a command. Before 0.4.19, `--help` and `-h` did too. With NativeCluster already running it changes nothing. Always give a command word: `nativecluster help` prints the usage on stdout and exits 0 (before 0.4.19 it wrote it to stderr and exited 2, so `nativecluster help 2>&1` shows it there).

## Exit codes

| Exit | What to do |
|---|---|
| 1 | The host refused the step, or nothing matched: read the message. For a step you confirm, 1 also means the person said no. |
| 2 | The words were wrong and nothing was sent: check `nativecluster help`. |
| 3 | Not signed in here: `nativecluster login`. |
| 4 | NativeCluster isn't running on this Mac: open it. |
| 5 | The main is out of reach: get on the office network with it, or wake it. Since 0.4.20, on a computer turned on for inference, an administrator's tools answer from its own models instead: see [Away from the office](https://www.nativecluster.com/docs/cluster.md#away-from-the-office). |
| 6 | Done in NativeCluster's window, or a step nobody confirmed within two minutes, or one nobody can confirm (`no_one_to_confirm`, `next: open_app`): run it again with the person at the Mac, or take the step in the window. |
| 7 | The host answered an error: read its message. |
| 8 | Too many requests in a moment: wait a few seconds. |
| 9 | `run`: the cluster doesn't have that model, and nothing was downloaded. For an agent since 0.4.21, it doesn't fit this Mac: the message says why (memory, or room in the folder); pick a smaller model, or, with `next: ask_admin`, an administrator gets it for the cluster. With `--no-get`, or a pipe at a terminal, run the `nativecluster models get` line it printed when it's wanted. |
| 10 | A person must claim this cluster first (`claim_needed`, since 0.4.21): run `nativecluster claim` and give the person the link. |

## `next` words

| `next` | What to do |
|---|---|
| `login` | Run `nativecluster login`. |
| `open_app` | Open NativeCluster's window: the step is done there. |
| `start_app` | Start NativeCluster on this Mac: `nativecluster open` (since 0.4.22; before, `open -a NativeCluster`). |
| `wait` | Wait, then try again. |
| `connect_to_cluster` | Get this Mac on its cluster's network, where it can reach the main. |
| `ask_admin` | An owner or administrator has to do it, or allow it. |
| `confirm_on_screen` | The person confirms on the Mac's screen; run the command again with them there. |
| `update` | Update NativeCluster: **Check for updates** in NativeCluster's menu bar menu, on this Mac. |
| `none` | Nothing the command can do next: read the message. |
| `claim` | A person claims the cluster an agent started (since 0.4.21): run `nativecluster claim --email <their email>` and give them the link. |
| `setup` | Nobody has set NativeCluster up on this Mac (since 0.4.21): an AI agent runs `nativecluster setup --accept-terms --email <its person's email>`, its person there or not; a person sets it up in NativeCluster's window. |

## Common cases

- **`login` says "The sign-in took too long."** It waits 10 minutes for the browser: run `nativecluster login` again.
- **`login` says NativeCluster is not set up on this Mac yet.** Open NativeCluster once and finish its first setup in its window, then sign in. An AI agent runs `nativecluster setup --accept-terms` instead, its person there or not (since 0.4.21).
- **`setup` refuses.** "NativeCluster is set up on this Mac already. Sign in: nativecluster login": it is, so sign in. "This Mac is registered with NativeCluster already. Sign in to it in NativeCluster's window.": a person registered it, so an agent can't take it. "This Mac has too little memory for any model NativeCluster offers.": it can't run a model. "Starting NativeCluster with no person is paused right now.": a person sets it up in NativeCluster's window. If it says NativeCluster is not open, run `open -a NativeCluster`, wait a few seconds, and try again.
- **Signing in at a Mac says "An AI agent set up this Mac."** The agent named someone else as its person, or no one. Ask it to name you, `nativecluster claim --email <your email>`, then sign in again, or open the link it gives you.
- **The claim link says "This agent named someone else".** Sign in with the email the agent named, or ask it to name you. A link works for an hour, once: after that it says it has ended, and `nativecluster claim` gives a new one.
- **`models get` downloaded nothing.** On a computer that joined a cluster with its switch off, models are downloaded on the main: run it there. On one turned on for inference, the cluster's owners and administrators download models to it (since 0.4.19): anyone else is told "On a computer lent to its cluster for inference, only the cluster's owners and administrators download and manage its models."
- **Piped output isn't JSON.** Output is text, also when piped: add `--json` for JSON.
- **Where is my download?** `models get` returns at once and the download carries on: `nativecluster models list` shows it.
- **"Only admins can download models".** Administrators and the Mac owner download models. Ask one.
- **A step waits, then exits 6.** It needs the person to confirm on the Mac with Touch ID or its password, within two minutes. On a main with no screen, the check goes to the person's own computer of the cluster.
- **`usage now` refuses.** It's for owners and administrators.
- **Not connected to the main.** The main is asleep or off, or this Mac is away from the office network. If NativeCluster says it needs your OK to reach the main on your network, turn on NativeCluster under Local Network (System Settings, Privacy & Security).
- **The PIN doesn't match.** Ask for the one showing now. A request ends after ten minutes or a few wrong PINs: choose **Ask again**.

## API errors

| Code | What to do |
|---|---|
| `invalid_api_key` (401) | Check the key, or make a new one. Every failed key gets this same answer. |
| `local_only` (403) | Call `http://localhost:8487/v1` from the same Mac, with a `Host` of `localhost`. |
| `developer_keys_off` (403) | The API is off on the main: its Mac owner runs `nativecluster keys on`. |
| `not_given` (403) | An owner or administrator gives the person that tool on Members. |
| `model_not_found` (404) | Name a model from `nativecluster models list`. |
| `no_model_fits` (503) | None of the cluster's computers can run a model that codes: an administrator downloads one. |
| `not_in_cluster` (409) | This Mac isn't in a cluster yet, or hasn't finished joining: finish in NativeCluster's window. |
| `main_unreachable` (503) | The main is asleep, or the API is off there. Retry after `Retry-After`. |
| `engine_unavailable` (503) | The main is restarting, something other than the cluster's own requests (such as other programs) holds the memory a computer needs, or (since 0.4.19) the Mac running the call is too busy to take it. Retry after `Retry-After`. Since 0.4.23, a request that needs memory the cluster's own requests hold waits in line for them instead. |
| `cluster_away` (503) | This Mac is away from its cluster's network, and doesn't answer this session itself: see [Away from the office](https://www.nativecluster.com/docs/cluster.md#away-from-the-office). |
| `model_unavailable` (503) | The Macs with that model take no new work now (on battery, or short of memory). |
| `rate_limit_exceeded` (429) | Wait the `Retry-After` seconds. |

See [The API](https://www.nativecluster.com/docs/api.md) for the rest.

## Still stuck

Write to hello@nativecluster.com with what `nativecluster doctor` printed. Never send anything starting `nck_` or `nct_`.
