Environment
- OS: Windows 11
- OpenClaw: 2026.4.1
- Gateway mode: Scheduled Task
Description
On Windows, running ollama launch openclaw when the OpenClaw Gateway is already running as a Scheduled Task (Session 0) creates a second node.exe process that also binds to port 18789, instead of detecting the existing gateway and restarting it.
Root Cause
The Ollama launch integration's gateway detection doesn't recognize the existing Scheduled Task process running in Session 0. Because user-session processes can't see Session 0 processes via standard process enumeration, ollama launch openclaw believes no gateway is running and starts a new one.
Symptoms
- Bonjour mDNS name conflict: gateway renamed to
DESKTOP-xxx (OpenClaw) (2)
RPC probe: failed in openclaw gateway status
EPERM errors writing to ~/.openclaw/devices/pending.json (two processes competing for the same file)
- Mass
handshake timeout / gateway closed (1006) errors in logs
gateway.cmd path mismatch if OpenClaw was previously installed via Ollama with a different nvm path
Steps to Reproduce
- Install OpenClaw on Windows, configure gateway as Scheduled Task (
openclaw gateway install)
- Confirm gateway is running:
openclaw gateway status → RPC probe: ok
- Run
ollama launch openclaw
- Check:
netstat -ano | findstr 18789 — two LISTENING entries on same port
Expected Behavior
ollama launch openclaw should detect the existing gateway (by checking port 18789 or the Scheduled Task state) and either skip gateway startup or gracefully replace the existing process.
Workaround
Use ollama launch openclaw --config to change model without touching the gateway.
If a duplicate process has already occurred:
# Run as Administrator
Stop-Process -Id <duplicate_PID> -Force
openclaw gateway start
Environment
Description
On Windows, running
ollama launch openclawwhen the OpenClaw Gateway is already running as a Scheduled Task (Session 0) creates a second node.exe process that also binds to port 18789, instead of detecting the existing gateway and restarting it.Root Cause
The Ollama launch integration's gateway detection doesn't recognize the existing Scheduled Task process running in Session 0. Because user-session processes can't see Session 0 processes via standard process enumeration,
ollama launch openclawbelieves no gateway is running and starts a new one.Symptoms
DESKTOP-xxx (OpenClaw) (2)RPC probe: failedinopenclaw gateway statusEPERMerrors writing to~/.openclaw/devices/pending.json(two processes competing for the same file)handshake timeout/gateway closed (1006)errors in logsgateway.cmdpath mismatch if OpenClaw was previously installed via Ollama with a different nvm pathSteps to Reproduce
openclaw gateway install)openclaw gateway status→RPC probe: okollama launch openclawnetstat -ano | findstr 18789— two LISTENING entries on same portExpected Behavior
ollama launch openclawshould detect the existing gateway (by checking port 18789 or the Scheduled Task state) and either skip gateway startup or gracefully replace the existing process.Workaround
Use
ollama launch openclaw --configto change model without touching the gateway.If a duplicate process has already occurred: