.claude/skills/openclaw-post-upgrade-scope-fix/SKILL.md
Fix OpenClaw cron delivery failing with "gateway closed (1008): pairing required" after an OpenClaw npm upgrade. Use when: (1) cron jobs complete their work but "cron announce delivery failed" on the iMessage/delivery step, (2) gateway logs show "pairing required" or code 1008 on WebSocket connections from cron subagents, (3) security audit logs show "scope-upgrade requested" with reason=scope-upgrade, (4) pending.json has an unresolved repair request. Root cause: new OpenClaw versions may require additional device scopes (e.g., operator.write) not present in existing paired device configs.
npx skillsauth add Dbochman/dotfiles openclaw-post-upgrade-scope-fixInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
After upgrading OpenClaw (npm), cron jobs complete their work (e.g., Gmail triage)
but fail at the delivery step with cron announce delivery failed. The gateway
rejects the cron subagent's WebSocket connection with code 1008 ("pairing required").
The error message is misleading — it's not a pairing issue, it's a missing scope.
gateway closed (1008): pairing requiredsecurity audit: device access upgrade requested with reason=scope-upgrade~/.openclaw/devices/pending.json contains a repair request with "isRepair": truessh dbochman@dylans-mac-mini
# Check for pending scope repair requests
cat ~/.openclaw/devices/pending.json
# Check current device scopes
cat ~/.openclaw/devices/paired.json | jq '.[] | {scopes, tokenScopes: .tokens.operator.scopes}'
# Check runtime logs for scope-upgrade requests
grep "scope-upgrade" /tmp/openclaw/openclaw-$(date +%Y-%m-%d).log
# Backup first
cp ~/.openclaw/devices/paired.json ~/.openclaw/devices/paired.json.bak
cp ~/.openclaw/devices/pending.json ~/.openclaw/devices/pending.json.bak
# Add the missing scope (e.g., operator.write) to BOTH arrays:
# 1. The device's top-level "scopes" array
# 2. The device's "tokens.operator.scopes" array
# Use jq or careful manual editing
# Example with jq (adjust device ID key as needed):
DEVICE_KEY=$(cat ~/.openclaw/devices/paired.json | jq -r 'keys[0]')
jq ".[\"$DEVICE_KEY\"].scopes += [\"operator.write\"] | .[\"$DEVICE_KEY\"].tokens.operator.scopes += [\"operator.write\"]" \
~/.openclaw/devices/paired.json > /tmp/paired-fixed.json && \
mv /tmp/paired-fixed.json ~/.openclaw/devices/paired.json
# Clear the pending repair request
echo '{}' > ~/.openclaw/devices/pending.json
launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/ai.openclaw.gateway.plist
sleep 3
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/ai.openclaw.gateway.plist
sleep 5
# Verify
launchctl list | grep openclaw.gateway
tail -20 ~/.openclaw/logs/gateway.log
set -a && source ~/.openclaw/.secrets-cache && set +a
PATH=/opt/homebrew/bin:/opt/homebrew/opt/node@22/bin:$PATH \
openclaw cron run weekly-upgrade-verify-0001 --timeout 300000 --expect-final
Use any cron job that delivers to Dylan for testing. Returns {"ok":true,"ran":true} on success.
launchctl list | grep openclaw.gateway shows a PIDopenclaw cron run completes delivery successfullycron announce delivery failed| File | Purpose |
|------|---------|
| ~/.openclaw/devices/paired.json | Device scopes and tokens |
| ~/.openclaw/devices/pending.json | Pending scope-upgrade repair requests |
| ~/.openclaw/logs/gateway.log | Gateway connection logs |
| /tmp/openclaw/openclaw-YYYY-MM-DD.log | Runtime logs with security audit entries |
operator.write as a required scope for cron announce deliverypending.json after upgradespaired.json scopes, check pending.jsontools
Use exact configured Reolink cameras through the local Home Hub for availability and power status, fresh stills, visual commentary, protected Dylan/Julia/household sharing, and reversible spotlight control. Supports trusted owner tasks and explicitly scoped proactive automations; not for Nest or Ring cameras, arbitrary recipients, recordings, account changes, or raw camera APIs.
data-ai
Privately manage Dylan and Julia's household plant inventory and care history by physical location, bed, and exact Flower Cam view. Use for confirmed plant onboarding from camera conversations, camera- or bed-filtered inventory, record corrections, individual or whole-bed care, and private filtered exports. Pair with reolink-camera when an owner asks about plants visible in Flower Cam images.
testing
Inspect and control the physically secured Reachy Mini at Crosstown through ClawBody. Use for requests to check Reachy, look around, express an emotion, play any official emotion or dance preset, speak proactively, mute or unmute its microphone, stop movement, or describe what its camera sees.
tools
Handle Reachy/iMessage handoffs, selective durable memory, forgetting, and diagnostics; automatic context comes from the gateway plugin.