Agent

DocsAgentTroubleshooting

Common issues with the Spectral Agent and how to resolve them.

Troubleshooting

Common issues and how to resolve them.

SymptomLikely CauseFix
Agent won't connectWebSocket blocked by firewall or proxyCheck that port 443 outbound is open. Try spectral serve --verbose for connection logs.
"Authentication failed"Expired or invalid tokenRun spectral login to refresh your auth token.
Commands timeoutLong-running process or missing dependencyCheck if the command needs user input. The agent has a default timeout; use more specific prompts to narrow the scope.
Agent can't find filesWrong project directory or file doesn't existMake sure spectral serve is running in the project root. Use ls or find in the chat to verify paths.
"Permission denied" errorsFile system permissionsThe agent runs with your user permissions. Check chmod on the files it's trying to access.
Node.js version too oldNode.js < 20Run node --version. Install Node.js 20+ from nodejs.org.
Port already in useAnother process on the relay portThe default port is configurable. Kill the conflicting process or use a different port with --port.
WebSocket disconnects frequentlyUnstable networkThe agent auto-reconnects with exponential backoff. Check your network stability or VPN connection.

Still stuck?

Check the Agent overview for architecture details, connection modes, and supported platforms.