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

# Check your setup

> Use the doctor to see which agents work, finish pairing, and find capture problems.

The doctor checks your Alike setup on this machine. Run it first when something does not work.

```bash theme={null}
npx @alikeai/setup --doctor
```

The doctor finds problems and reports them. It also finishes pairing when the machine is not paired. It does not change your agents' settings. To repair the wiring, run the installer again: `npx @alikeai/setup`.

## What the doctor checks

> [accordion] Agent status
>
> One line for each agent that the doctor finds:
>
> | Line | Meaning | What to do |
> | - | - | - |
> | `<Agent>: healthy` | Wired and paired. Alike accepts the credential | Nothing |
> | `<Agent>: detected but not wired — re-run` | The agent is on the machine, but Alike is not in its settings | Run `npx @alikeai/setup` |
> | `<Agent>: wired, not yet paired — re-run to pair` | The machine is not paired | The doctor starts pairing. Approve the code |
> | `<Agent>: token rejected (401) — re-pair` | Alike refused the machine's credential | The doctor starts pairing. Approve the code |
> | `<Agent>: server unreachable` | The doctor could not reach Alike | Check your network. See [Troubleshooting](https://alike.help/help/troubleshooting.md#alike-cannot-be-reached) |
> | `runtime shim missing — re-run to reinstall` | The local runtime in `~/.alike/runtime` is gone | Run `npx @alikeai/setup` |

> [accordion] Hook activity
>
> For each wired agent, the doctor shows if its hooks ran on this machine:
>
> * `firing (N hook runs, last <time>)`: the hooks work.
> * `wired, but its hooks have NEVER fired — check the harness is restarted and hooks are enabled`: the agent did not run the hooks yet. See [Hooks never run](https://alike.help/help/troubleshooting.md#hooks-never-run).
>
> For Codex, the doctor also reminds you to approve the **Hooks need review** prompt.

> [accordion] Connection test
>
> The doctor sends two test events to Alike. The line starts with `Telemetry round-trip:`.
>
> | Result | Meaning |
> | - | - |
> | `server accepted 2 events` | The connection works |
> | `the Builder loop is turned off in your Alike preferences — nothing is being recorded` | Your Alike account is set to not record agent sessions. You cannot change this setting in the web app. Contact [support@alike.work](mailto:support@alike.work) |
> | `credentials rejected — re-pair with ...` | Pair again |
> | `server accepted <n> of 2 events` | Alike accepted only some test events. Run the doctor again |
> | `not paired yet` | The machine is not paired. The doctor starts pairing |
> | `endpoint unreachable` | Network problem |
> | `endpoint returned HTTP <code>` | Alike returned an error. Try again later |

> [accordion] Capture coverage
>
> For each agent that you chose for transcript capture:
>
> * `N session(s) found`: the doctor found this many session files.
> * `detected but 0 sessions found in <folder> — capture may be misconfigured`: the agent is installed, but the doctor found no history in the expected folder. The agent may keep history in a different place on your version. Tell [support@alike.work](mailto:support@alike.work).
> * `capture disabled (not selected at install)`: you did not choose this agent for capture.

> [accordion] Sweep health
>
> A sweep copies new transcripts and uploads them. The doctor shows:
>
> * How long ago the last sweep ran, and counts for each agent.
> * `N of M archived session(s) never uploaded to this server`: some sessions are copied on the machine but not uploaded yet.
> * `N session(s) permanently rejected by the server — see ~/.alike/logs/sweep.log`: Alike refused these sessions, for example because a session is too large. They are not sent again.
> * ``no sweep has completed on this machine yet — run `npx @alikeai/setup --sweep` ``: no sweep ran yet.

## Exit code

The doctor exits with code `1` only when the runtime is missing or Alike refuses the credential. It exits with code `0` when the connection test or the capture check fails. Read the output, not only the exit code.

## Save raw hook data for a bug report

If support asks you for raw hook data, run:

```bash theme={null}
npx @alikeai/setup --doctor --dump-hook-payload
```

The hooks then save one raw input for each agent and hook event in `~/.alike/payloads/`. This data can contain your prompts and code.

> [!WARNING]
>
> The doctor tells you to run it again without the flag to stop the recording. That does not work. When you are done, delete the folder yourself:
>
> ```bash theme={null}
> rm -rf ~/.alike/payloads
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.