-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
[Bug]: CLI gateway probe reports "missing scope: operator.read" despite full scopes in paired.json (2026.3.13) #46568
Description
Bug type
Regression (worked before, now fails)
Summary
CLI gateway probe reports "missing scope: operator.read" even though paired.json and device-auth.json contain operator.read and operator.write in all device and token scopes (2026.3.13).
Steps to reproduce
- Run OpenClaw 2026.3.13 on Ubuntu 24.04 with systemd gateway (local, loopback).
- Run over SSH:
ssh user@vps "npx openclaw status --all"ornpx openclaw security audit --deep. - Observe "missing scope: operator.read" in Gateway health / probe output.
Expected behavior
CLI should have full operator access (including RPC methods used by security audit) when the device token and paired.json have operator.read, operator.write, operator.admin, operator.approvals, operator.pairing.
Actual behavior
Gateway connects (Reachable: yes, Connect: ok) but RPC is limited: "RPC: limited - missing scope: operator.read". Security audit --deep and status --all report "Gateway: unreachable (missing scope: operator.read)".
OpenClaw version
2026.3.13
Operating system
Ubuntu 24.04 (linux 6.8.0-101-generic x64)
Install method
npm global / npx
Model
N/A - gateway auth bug
Provider / routing chain
N/A - gateway auth
Config file / key location
~/.openclaw/openclaw.json, ~/.openclaw/devices/paired.json, ~/.openclaw/identity/device-auth.json
Additional provider/model setup details
N/A
Logs, screenshots, and evidence
openclaw gateway probe output:
- Reachable: yes
- Connect: ok (50ms)
- RPC: limited - missing scope: operator.read
paired.json (CLI device, redacted) has:
- device.scopes: ["operator.read","operator.write","operator.admin","operator.approvals","operator.pairing"]
- tokens.operator.scopes: same
device-auth.json has same scopes. Tried devices rotate, manual patch, clientId gateway-client→cli, gateway restart — no fix.Journal evidence (gateway logs):
[ws] ⇄ res ✗ status 0ms errorCode=INVALID_REQUEST errorMessage=missing scope: operator.read [ws] ⇄ res ✗ system-presence 0ms errorCode=INVALID_REQUEST errorMessage=missing scope: operator.read [ws] ⇄ res ✗ config.get 0ms errorCode=INVALID_REQUEST errorMessage=missing scope: operator.read
Meanwhile channels.status and doctor.memory.status succeed (different conn IDs), so scope check is per-connection and some RPCs require operator.read.
Impact and severity
Affected: Operators running CLI over SSH (e.g. make check, security audit --deep)
Severity: Medium — blocks full gateway probe and deep security audit
Frequency: 100% reproducible
Consequence: Cannot run openclaw security audit --deep; status --all shows "unreachable (missing scope: operator.read)"
Related: #23006, #21688, #22193. All documented workarounds (rotate, patch paired.json, clientId) applied without success.
Additional information
Docs indicate clients must declare scopes in connect handshake. Hypothesis: CLI may send a different/cached scope list in connect.params.scopes than device-auth.json, or gateway validates scopes differently than stored paired.json.
Gateway Protocol: https://docs.openclaw.ai/gateway/protocol