Gateway
Agent replies and Control UI
Agent run failed with a storage error
An error naming the Gateway state database identifies a storage failure observed during the run. The chat banner, recorded assistant error, and embedded_run_agent_end log show the same diagnosis. Provider response bodies remain redacted.
| SQLite message | Next step |
|---|---|
database is locked or database table is locked |
Retry. If it repeats, check Gateway logs and concurrent storage maintenance. |
database or disk is full |
Free disk space on the Gateway host, then retry. |
attempt to write a readonly database |
Check the Gateway service user's storage permissions and filesystem mount mode. |
disk I/O error |
Check storage health and filesystem access before retrying. This message alone does not prove disk exhaustion. |
A transcript writer ownership error means the run lost its session write claim. Retry in the current session and inspect Gateway logs if it recurs. Storage failures do not trigger provider credential rotation or automatic replay of the run.
Use openclaw logs --follow to correlate the run with storage activity. SQLite can contend between connections or worker threads in one Gateway process; seeing only one process with the database open does not rule out contention. See database concurrency notes. Avoid full database compaction while runs are active.
No replies
If channels are up but nothing answers, check routing and policy before reconnecting anything.
openclaw statusopenclaw channels status --probeopenclaw pairing list --channel <channel> [--account <id>]openclaw config get channelsopenclaw logs --followLook for:
- Pairing pending for DM senders.
- Group mention gating (
requireMention,mentionPatterns). - Channel/group allowlist mismatches.
Common signatures:
drop guild message (mention required→ group message ignored until mention.pairing request→ sender needs approval.blocked/allowlist→ sender/channel was filtered by policy.
Related:
Dashboard control UI connectivity
When the dashboard/control UI will not connect, validate URL, auth mode, and secure context assumptions.
openclaw gateway statusopenclaw statusopenclaw logs --followopenclaw doctoropenclaw gateway status --jsonLook for:
- Correct probe URL and dashboard URL.
- Auth mode/token mismatch between client and gateway.
- HTTP usage where device identity is required.
If a local browser cannot connect to 127.0.0.1:18789 after an update, first recover the local Gateway service and confirm it is serving the dashboard:
openclaw gateway restartlsof -i :18789curl http://127.0.0.1:18789If curl returns OpenClaw HTML, the Gateway is working and the remaining issue is likely browser cache, an old deep link, or stale tab state. Open http://127.0.0.1:18789 directly and navigate from the dashboard. If restart does not leave the service running, run openclaw gateway start and recheck openclaw gateway status.
Connect / auth signatures
device identity required→ non-secure context or missing device auth.origin not allowed→ browserOriginis not ingateway.controlUi.allowedOrigins(or you are connecting from a non-loopback browser origin without an explicit allowlist).device nonce required/device nonce mismatch→ client is not completing the challenge-based device auth flow (connect.challenge+device.nonce).device signature invalid/device signature expired→ client signed the wrong payload (or stale timestamp) for the current handshake.AUTH_TOKEN_MISMATCHwithcanRetryWithDeviceToken=true→ client can do one trusted retry with cached device token.- That cached-token retry reuses the cached scope set stored with the paired device token. Explicit
deviceToken/ explicitscopescallers keep their requested scope set instead. AUTH_SCOPE_MISMATCH→ the device token was recognized, but its approved scopes do not cover this connect request; re-pair or approve the requested scope contract instead of rotating a shared gateway token.- Outside that retry path, connect auth precedence is explicit shared token/password first, then explicit
deviceToken, then stored device token, then bootstrap token. - On the async Tailscale Serve Control UI path, failed attempts for the same
{scope, ip}are serialized before the limiter records the failure. Two bad concurrent retries from the same client can therefore surfaceretry lateron the second attempt instead of two plain mismatches. too many failed authentication attempts (retry later)from a browser-origin loopback client → repeated failures from that same normalizedOriginare locked out temporarily; another localhost origin uses a separate bucket.- Repeated
unauthorizedafter that retry → shared token/device token drift; refresh token config and re-approve/rotate device token if needed. gateway connect failed:→ wrong host/port/url target.
Auth detail codes quick map
Use error.details.code from the failed connect response to pick the next action:
| Detail code | Meaning | Recommended action |
|---|---|---|
AUTH_TOKEN_MISSING |
Client did not send a required shared token. | On the Gateway host, run openclaw gateway auth-token --show in an interactive terminal, paste the output into the client, and retry. |
AUTH_TOKEN_MISMATCH |
Shared token did not match gateway auth token. | If canRetryWithDeviceToken=true, allow one trusted retry. Cached-token retries reuse stored approved scopes; explicit deviceToken / scopes callers keep requested scopes. If still failing, run the token drift recovery checklist. |
AUTH_DEVICE_TOKEN_MISMATCH |
Cached per-device token is stale or revoked. | Rotate/re-approve device token using devices CLI, then reconnect. |
AUTH_SCOPE_MISMATCH |
Device token is valid, but its approved role/scopes do not cover this connect request. | Re-pair the device or approve the requested scope contract; do not treat this as shared-token drift. |
PAIRING_REQUIRED |
Device identity needs approval. Check error.details.reason for not-paired, scope-upgrade, role-upgrade, or metadata-upgrade, and use requestId / remediationHint when present. |
Approve pending request: openclaw devices list then openclaw devices approve <requestId>. Scope/role upgrades use the same flow after you review the requested access. |
Device auth v2 migration check:
openclaw --versionopenclaw doctoropenclaw gateway statusIf logs show nonce/signature errors, update the connecting client and verify it:
Wait for connect.challenge
Client waits for the gateway-issued connect.challenge.
Sign the payload
Client signs the challenge-bound payload.
Send the device nonce
Client sends connect.params.device.nonce with the same challenge nonce.
If openclaw devices rotate / revoke / remove is denied unexpectedly:
- Paired-device token sessions can manage only their own device unless the caller also has
operator.admin. openclaw devices rotate --scope ...can only request operator scopes that the caller session already holds.
Related:
- Configuration (gateway auth modes)
- Control UI
- Devices
- Remote access
- Trusted proxy auth