Summary
devices pairing/scope upgrade can get into a loop where the same device repeatedly triggers scope-upgrade and pairing required on every reconnect, even after approval/rotation attempts.
In this state, local commands (for example openclaw status) can keep failing with gateway connect failed: pairing required and the gateway logs show repeated upgrade requests every ~1s.
Environment
- OpenClaw:
2026.2.19-2
- Gateway service: systemd, local loopback
ws://127.0.0.1:18789
- OS: Linux (WSL2)
- Observed on: 2026-02-20 (UTC)
Reproduction (deterministic)
Device ID used below (from openclaw devices list --json):
<device-id-redacted>
- Start from a healthy paired state.
- Intentionally rotate the device token to a narrower scope (remove read/write):
openclaw devices rotate \
--device <device-id-redacted> \
--role operator \
--scope operator.admin \
--scope operator.approvals \
--scope operator.pairing \
--json
- Run a command that requires gateway access:
- Check logs:
rg -n "scope-upgrade|pairing required" <gateway-log-file> -S | tail -n 40
Actual behavior
- CLI output includes:
gateway connect failed: Error: pairing required
- Gateway logs repeatedly show:
security audit: device access upgrade requested reason=scope-upgrade ...
closed before connect ... cause=pairing-required ... reason=scope-upgrade
- A pending repair request for the same device can keep reappearing.
- During the loop,
devices list output can appear temporarily inconsistent across calls (pending/paired scopes changing non-atomically).
Expected behavior
- One of these should happen (deterministically):
- automatic scope upgrade and stable reconnect, or
- a single pending request that, once approved/rotated, does not immediately re-trigger for the same device.
- No repeated per-second reconnect/pairing loop for the same device.
Relevant log samples
From <gateway-log-file>:
2026-02-20T07:17:46.647Z: device access upgrade requested reason=scope-upgrade ... scopesFrom=operator.admin,operator.approvals,operator.pairing scopesTo=operator.write
2026-02-20T07:17:46.650Z: gateway connect failed: Error: pairing required
2026-02-20T07:17:46.656Z: gateway/ws ... cause=pairing-required ... reason=scope-upgrade
This pattern repeats every ~1 second until manual intervention.
Temporary workaround
- Approve latest pending repair request:
openclaw devices approve --latest --json
- Rotate token to include full scopes used by local client:
openclaw devices rotate \
--device <device-id> \
--role operator \
--scope operator.read \
--scope operator.write \
--scope operator.admin \
--scope operator.approvals \
--scope operator.pairing \
--json
Even with this, the system can briefly re-enter pending/repair churn before converging.
Summary
devicespairing/scope upgrade can get into a loop where the same device repeatedly triggersscope-upgradeandpairing requiredon every reconnect, even after approval/rotation attempts.In this state, local commands (for example
openclaw status) can keep failing withgateway connect failed: pairing requiredand the gateway logs show repeated upgrade requests every ~1s.Environment
2026.2.19-2ws://127.0.0.1:18789Reproduction (deterministic)
Device ID used below (from
openclaw devices list --json):<device-id-redacted>Actual behavior
gateway connect failed: Error: pairing requiredsecurity audit: device access upgrade requested reason=scope-upgrade ...closed before connect ... cause=pairing-required ... reason=scope-upgradedevices listoutput can appear temporarily inconsistent across calls (pending/paired scopes changing non-atomically).Expected behavior
Relevant log samples
From
<gateway-log-file>:2026-02-20T07:17:46.647Z:device access upgrade requested reason=scope-upgrade ... scopesFrom=operator.admin,operator.approvals,operator.pairing scopesTo=operator.write2026-02-20T07:17:46.650Z:gateway connect failed: Error: pairing required2026-02-20T07:17:46.656Z:gateway/ws ... cause=pairing-required ... reason=scope-upgradeThis pattern repeats every ~1 second until manual intervention.
Temporary workaround
Even with this, the system can briefly re-enter pending/repair churn before converging.