# If something fails

> The common failures between installing sc and a working first session, each with the line sc prints and the fix.
>
> sc stops with one line that names the cause. Find it below; the fix sits beside it.

Not sure what failed? Run `sc doctor`. It checks the environment and every workspace you have, and changes nothing.

```sh
sc doctor
```

| You see | Do this |
|---|---|
| `command not found` for `sc` | Add `export PATH="$HOME/.local/bin:$PATH"` to your shell profile, then open a new terminal. |
| `no superclaude key` when sharing or installing a share | `sc shares login <key>` |
| `Claude Code itself isn't installed` | Install Claude Code, run `claude` once to sign in, then run `sc system` again. |
| `` `python3` is not on PATH `` | Install Python 3 (`brew install python3` on macOS), then run `sc system` again. |
| `isn't bootstrapped yet`, or `no vault selected` | Run `sc system`, or set a default with `sc vault default <name>`. |
| `step "vendor plugins"` | Read the cause after the dash. Most often it is the network: run `sc system` again. |

Where `sc` prints your absolute home path, the messages on this page show `~`.

**command not found for sc**

The installer puts `sc` in `~/.local/bin`. When that directory is not on your `PATH`, the installer ends with:

```text
! ~/.local/bin is not on your PATH. Add this to your shell profile:
```

Your shell then answers `sc` with `command not found`. Add the directory to your shell profile, such as `~/.zshrc` or `~/.bashrc`, open a new terminal, and check:

```sh
export PATH="$HOME/.local/bin:$PATH"
sc --version
```

If you installed with `SC_INSTALL_DIR`, add that directory instead.

**a share needs a superclaude key**

Sending and installing a share both need a superclaude key, saved once on this machine:

```sh
sc shares login <key>
sc install https://superclaude.io/s/<link>
```

| Where | What you see |
|---|---|
| `sc <project> --share`, `sc install` with no key saved | a line starting `no superclaude key for https://superclaude.io — run` `sc shares login <key>` |
| a key the share server no longer accepts | ``https://superclaude.io rejected the key — run `sc shares login <key>` with a valid superclaude key`` |
| the fresh-machine installer, when its key cannot be saved | `could not save the key; run: sc shares login <key>` |

`sc shares login` saves the key to `[share]` in `config.toml` (mode 0600) and checks it against the server. It exits non-zero on a rejected key. If `[share].key` reads `${VAR}` and that variable is not exported, the key is empty: export it, or save the key again. See [Share a project](/docs/sharing#set-the-name-and-key-a-share-uses).

Reading the site, installing `sc`, `sc system`, `sc update` and downloading a release need no key at all.

**a private release server rejected the key (HTTP 401)**

Only a release server that asks for a key answers `401`. `https://superclaude.io` never does, so this means `[dist]` in `config.toml` points at a private server.

| Where | What you see |
|---|---|
| `sc dist login`, `sc dist status`, `sc system` | ``<url> rejected the access key (HTTP 401) — run `sc dist login <key>` with a valid key`` |
| a download inside the installer, against a private `SUPERCLAUDE_BASE` | `<url> refused the download (401): it wants a key, set SUPERCLAUDE_KEY` |

Save the key again and check it:

```sh
sc dist login --url <url> <key>
sc dist status
```

`sc dist login` exits non-zero on a rejected key and keeps it saved, so `sc dist status` shows the last four characters of the key that was tried. If `[dist]` reads the key from `${VAR}` and that variable is not exported, the `key:` line reads `none — ${VAR} expands to nothing`. To stop using the private server, run `sc dist logout` and `sc system` reads releases from `https://superclaude.io` again. See [Install](/docs/install#point-sc-at-a-private-release-server).

**Claude Code itself isn't installed, or isn't signed in**

`sc system` checks for `claude` before it changes anything:

```text
sc: Claude Code itself isn't installed. Please go to https://claude.com/claude-code, install it, log in once (it'll open a browser), then come back and re-run me. I'll resume from here.
```

The installer warns about the same case. Any other launch reports a missing `claude` as `execvp claude failed: <error> (is it on PATH / executable?)`.

`sc` does not check the sign-in. If Claude Code is installed but not signed in, the session `sc` starts stops at Claude Code's own sign-in. Install Claude Code, sign in once with plain `claude`, then re-run:

```sh
claude
sc system
```

**python3 is not on PATH**

`sc system` checks for `python3` right after `claude`, before any setup:

```text
sc: `python3` is not on PATH. Every vendored plugin's hooks (session start, memory consolidation, ...) are python3 scripts, and the doctor that would normally explain a missing interpreter is itself one of those scripts — so it can never run to tell you this. Install Python 3 (e.g. `brew install python3` on macOS, or your distro's package manager on Linux), then re-run `sc system`.
```

The installer warns too, with `python3 is not installed — plugin hooks need it`. Install Python 3 and re-run `sc system`.

**isn't bootstrapped yet, or no vault selected**

On a machine where `sc system` has not run, a launch or `sc create` stops before it looks for a vault:

```text
sc: ~/.superclaude isn't bootstrapped yet (config.toml is absent) — run `sc system` first
```

The reason in parentheses is one of `config.toml is absent`, `no default vault is registered`, `plugins/ is missing or has no plugins in it` or `system/ is missing`. Run `sc system`. It creates what is missing, and registers a `default` vault at `~/.superclaude/default` when no default vault resolves.

After setup, a command such as `sc list` that needs a vault and cannot pick one says:

```text
sc: no vault selected (registered: personal, work); set `default` in ~/.superclaude/config.toml (e.g. via `sc vault default <name>`) or pass -v <name>
```

Set a default, or name the vault for one launch:

```sh
sc vault ls
sc vault default <name>
sc -v <name> <project> <agent>
```

A `-v` or `default` that names an unregistered vault fails with ``no vault named `<name>` registered in ~/.superclaude/config.toml``. Register it with `sc vault add <name> <path>`. See [How it fits together](/docs/concepts) for the resolution order.

**step "vendor plugins" failed**

`sc system` names the step that failed and does not launch:

```text
sc: sc system: step "vendor plugins" — populating ~/.superclaude/plugins: <cause>
```

| Cause | Fix |
|---|---|
| `could not reach https://superclaude.io (<detail>)` | Check the network, then re-run `sc system`. |
| ``<url> rejected the access key (HTTP 401) — run `sc dist login <key>` with a valid key`` | Only a private release server in `[dist]`. See *a private release server rejected the key*, above. |
| ``plugin `<name>`: sha256 mismatch — the download does not match the release manifest`` | Re-run `sc system`. A bad bundle leaves the whole plugin tree as it was. |
| `` `tar` is not on PATH — required to unpack plugin bundles `` | Install `tar`, then re-run `sc system`. |
| `the release manifest at https://superclaude.io/dl/latest.json uses schema <n>, and this sc understands schema <m> — re-run the installer to upgrade sc` | Re-run the installer. |

The same step installs the shared prompt library, so a failed library download stops here too, before any plugin changes.

`sc dist status` shows the server, the key (or `none`), and the release your plugins came from. Once `~/.superclaude/plugins/` holds plugins, `sc system --no-plugin-refresh` launches with what is on disk. It cannot help a first run: an empty `plugins/` is always fetched.

**Rarer: the daemon port is in use**

The [daemon](/docs/daemon) listens on loopback port `48770` by default. When another process holds it, a normal launch warns and starts the session without the daemon, so there is no session tracking and no gateway:

```text
sc: warning: daemon start failed, continuing: sc daemon did not become healthy within the startup timeout on port 48770 — port 48770 is already in use by another process (<error>). Free it (`lsof -nP -iTCP:48770 -sTCP:LISTEN`), or pick another port: `sc --daemon-port <n> …` for one run, or set `port = <n>` under `[daemon]` in config.toml to make it stick (both sides read it, so they can't disagree).
```

A gateway launch (`-u <profile>`) needs the daemon, so it stops with `daemon did not become ready within 10s of lazy-spawn`. `sc daemon start` reports `daemon failed to start on port 48770` with the same hint.

Find the process holding the port, or move the daemon for one run:

```sh
lsof -nP -iTCP:48770 -sTCP:LISTEN
sc --daemon-port <n> <project> <agent>
```

To move it for good, set `port` under `[daemon]` in [config.toml](/docs/config-toml). On Linux, pick a port below 32768, outside the default ephemeral range.

**Rarer: a manifest cannot find core.toml**

`sc system` installs the shared section library, `core.toml`, from the release. A workspace whose manifest imports from `$SC_PROMPTS/core.toml` cannot render without it, and the launch stops:

```text
sc: cannot open `~/.superclaude/_global/shared/prompt/core.toml`: No such file or directory (os error 2)
```

The file is missing when `sc system` has not run since you installed or upgraded `sc`, when every run since used `--no-plugin-refresh`, when the file was moved or deleted, or when `$SC_PROMPTS` now points somewhere else. `sc validate` reports the same error on every model branch. When the directory itself is missing, `sc doctor` adds an `sc-prompts` warning: `~/.superclaude/_global/shared/prompt (<profiles_home>/_global/shared/prompt) does not exist`. The system workspace imports nothing from the library, so `sc system` still launches.

Re-run `sc system`, then check the `prompts:` line:

```sh
sc system
sc dist status
```

`sc system` installs the library whenever it is missing, even when the plugins are already current. Once you have edited your copy, `sc system` leaves it alone and prints ``sc: prompts: a newer core.toml is published, but <path> has local edits — left as-is (move it aside and re-run `sc system` to install the new one)`` when the release moves on.

To install it by hand instead, for example into a custom `$SC_PROMPTS`:

```sh
mkdir -p ~/.superclaude/_global/shared/prompt
curl -fsSL https://superclaude.io/core.toml -o ~/.superclaude/_global/shared/prompt/core.toml
```

[Install the library](/docs/system-prompt#install-the-library) covers a custom `$SC_PROMPTS` or `$SUPERCLAUDE_HOME`. The [prompts page](/prompts) shows every section the library ships.

**Every read-only check**

These commands report state and edit nothing:

```sh
sc doctor
sc <project> <agent> --doctor
sc dist status
sc daemon status
```

`sc doctor` checks the environment and every workspace in your registered vaults. `sc <project> <agent> --doctor` runs the same checks for the one workspace a launch resolves. `sc dist status` shows the release server, the key (or `none`), and whether the plugins and the shared prompt library are current. `sc daemon status` reports the background daemon. The [commands reference](/docs/cli) covers each one.
