OpenClaude

OpenClaw Sub-Agent Spawning Fails: “gateway closed (1008): pairing required”

Cartoon illustration of a frustrated sysadmin at a terminal showing a WebSocket error "1008: pairing required". A small lobster tangled in cables is being blocked by a padlock labeled "nginx" while trying to connect a plug labeled "sub-agent" to the gateway. The sysadmin points triumphantly at a config file showing ws://127.0.0.1:18789.

If your OpenClaw sub-agents keep dying with gateway closed (1008): pairing required, the fix isn’t what you’d expect. The device is paired, the token is valid — the problem is that sub-agents are routing back through your reverse proxy instead of talking to the gateway directly. Two config changes and a quick device approval after restart, and they’ll be spawning cleanly in parallel.