Bug Description
After upgrading to OpenClaw 2026.2.19-2, loopback (ws://127.0.0.1:18789) connections require device pairing approval on every gateway restart. Previously, loopback connections were auto-approved.
Environment
- OpenClaw: 2026.2.19-2 (45d9b20)
- OS: macOS 26.2 (arm64)
- Node: v25.4.0
- Gateway bind:
loopback
- Auth: token mode
Steps to Reproduce
- Fresh install or upgrade to 2026.2.19-2
- Set
gateway.bind: "loopback" in ~/.openclaw/openclaw.json
- Start gateway:
openclaw gateway start
- Device pairs successfully (via Control UI approval)
- Restart gateway:
openclaw gateway restart
- All tool calls that use gateway WS now fail with:
gateway closed (1008): pairing required
Expected Behavior
Loopback connections should auto-approve device pairing (as documented in security docs: "Device pairing is auto-approved for local connects (loopback or the gateway host's own tailnet address)").
Actual Behavior
After any gateway restart, the device pairing state is lost or invalidated. Tools that connect via gateway WS (sessions_spawn, sessions_list, cron, etc.) fail with "pairing required". The nodes tool sometimes works (read-only scope) while write operations fail.
Observations
~/.openclaw/identity/device.json exists with valid keys
~/.openclaw/devices/paired.json contains the local device with matching deviceId
~/.openclaw/identity/device-auth.json has operator token
- Device IS in paired list but gateway still rejects connections after restart
- Manually approving via Control UI fixes it temporarily until next restart
openclaw status CLI command works fine (different connection path?)
- Non-loopback bind (
lan) triggers separate SECURITY ERROR for ws:// to non-loopback
Workaround
Manually approve the device via Control UI (http://127.0.0.1:18789/) after every gateway restart.
Impact
- Sub-agent spawning broken after restarts
- Cron jobs cannot execute
- Session management tools unavailable
- Requires manual intervention after every restart/update
Bug Description
After upgrading to OpenClaw 2026.2.19-2, loopback (
ws://127.0.0.1:18789) connections require device pairing approval on every gateway restart. Previously, loopback connections were auto-approved.Environment
loopbackSteps to Reproduce
gateway.bind: "loopback"in~/.openclaw/openclaw.jsonopenclaw gateway startopenclaw gateway restartgateway closed (1008): pairing requiredExpected Behavior
Loopback connections should auto-approve device pairing (as documented in security docs: "Device pairing is auto-approved for local connects (loopback or the gateway host's own tailnet address)").
Actual Behavior
After any gateway restart, the device pairing state is lost or invalidated. Tools that connect via gateway WS (
sessions_spawn,sessions_list,cron, etc.) fail with "pairing required". Thenodestool sometimes works (read-only scope) while write operations fail.Observations
~/.openclaw/identity/device.jsonexists with valid keys~/.openclaw/devices/paired.jsoncontains the local device with matching deviceId~/.openclaw/identity/device-auth.jsonhas operator tokenopenclaw statusCLI command works fine (different connection path?)lan) triggers separate SECURITY ERROR for ws:// to non-loopbackWorkaround
Manually approve the device via Control UI (
http://127.0.0.1:18789/) after every gateway restart.Impact