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

# Troubleshooting

> Fixes for the messages you are most likely to see from specpilot serve, the local MCP and the CLI.

Each entry starts with what you see, then the fix.

## Starting the App

* **`Port 4321 is already in use.`** Another program, or another `serve`, has the port. Stop it with `specpilot serve --stop`, or start on the next port with `specpilot serve --port 4322` and copy your IDE config again.
* **`No .specs/ folder in this directory.`** Run `specpilot serve` from the project's root, or `specpilot serve .` to set up specs in this folder from the page (see [Set up specs with your agent](https://docs.specpilot.dev/mcp/setup.md)).
* **`Could not open a browser. Open <url> yourself.`** `--open` couldn't start your browser. Open the address it prints.
* **The page is blank inside an editor's built-in browser.** The App doesn't display inside another tool's frame. Open the address in a browser tab.
* **A Node.js warning on every command, or a banner at the top of the App.** Your Node.js has known security holes. The command still runs. Update to a version listed in [What you need](https://docs.specpilot.dev/index.md#what-you-need).

## Connecting your AI IDE

* **`did not carry a valid X-SpecPilot-Token header`.** The token changed when `serve` restarted. Copy the config again, or [keep the token](https://docs.specpilot.dev/mcp/on-off.md#keep-the-token).
* **`SPECPILOT_MCP_TOKEN must be at least 32 characters`.** Set a longer value with no spaces, for example from `openssl rand -hex 32`, or unset it to get a new token each run.
* **The Setup view stays on `Waiting for a connection`.** Check that the config is in the file your IDE reads (see [Connect your AI IDE](https://docs.specpilot.dev/mcp/connect.md)), and restart your IDE or reload its MCP servers.

## The board

* **A move or new task is refused and the page redraws.** `tasks.md` changed on disk since the page loaded, often because your agent just wrote it. Try again on the redrawn board.
* **A warning above the lanes.** A lane heading is missing or a lane isn't a table. The warning names the fix, and Copy prompt gives your agent the line (see [The board](https://docs.specpilot.dev/app/board.md#warnings-above-the-lanes)).
* **`… is a symbolic link, so nothing was written.`** SpecPilot never writes through a link. Replace the linked file or folder with a real one.

## Clone a repository

* **`Host key verification failed.`** The page can't accept an ssh host key for you. Run `ssh -T git@<host>` once in a terminal, then clone again (see [Clone a repository](https://docs.specpilot.dev/app/clone.md)).

## The CLI

* **Permission errors on `npm i -g`.** Point npm at a folder you own with `npm config set prefix '~/.npm-global'` and add `~/.npm-global/bin` to your `PATH`. Or skip the install and use `npx specpilot`.
* **`specpilot validate` reports problems.** Run `specpilot validate --verbose` to see each one, and `specpilot validate --fix` to repair the ones it can.
* **You need more detail from a command.** Run it as `DEBUG=specpilot specpilot <command>`.

Still stuck? Open an issue on [GitHub](https://github.com/girishr/SpecPilot/issues) with the command, the message and the output of `specpilot --version`.


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