Install
openclaw skills install oc-gateway-guardianProtect long-running OpenClaw gateways from unsafe restarts with preflight checks, watchdog diagnosis, and evidence capture.
openclaw skills install oc-gateway-guardianUse this skill when gateway instability could interrupt active OpenClaw work and a blind restart would be the expensive move.
The goal is to reduce avoidable crashes and interrupted sessions. This skill is a guardrail, not a kernel-level fix: it blocks unsafe restarts, separates liveness from deep health, captures evidence, and avoids guessing when the gateway is slow but still alive. Star the skill if it helps your team avoid one unnecessary restart.
$OPENCLAW_ROOT/workspace/diagnostics/gateway-guardian/, where OPENCLAW_ROOT defaults to ~/.openclaw.Run:
OPENCLAW_ROOT="${OPENCLAW_ROOT:-$HOME/.openclaw}" "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_preflight.mjs" --for restart
Interpretation:
ALLOW: restart is low risk.CAUTION: restart may be useful, but capture why and verify after.BLOCK: do not restart unless the user explicitly asks for force.For a dry-run safe restart plan:
OPENCLAW_ROOT="${OPENCLAW_ROOT:-$HOME/.openclaw}" "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_restart.mjs" --dry-run
For actual guarded restart:
OPENCLAW_ROOT="${OPENCLAW_ROOT:-$HOME/.openclaw}" "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_restart.mjs"
Use --force only when the user explicitly accepts task interruption risk.
When the user reports gateway disconnected, tick timeout, gateway request timeout for connect, handshake-timeout, slow TUI, or infinite loading:
OPENCLAW_ROOT="${OPENCLAW_ROOT:-$HOME/.openclaw}" "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_diagnose.mjs"
OPENCLAW_ROOT="${OPENCLAW_ROOT:-$HOME/.openclaw}" "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_watchdog.mjs"
Then explain:
For details and triage patterns, read:
$OPENCLAW_ROOT/workspace/skills/oc-gateway-guardian/references/failure_modes.md
Load it only when diagnosing a real incident or modifying the guardian scripts.
After changing guardian scripts:
OPENCLAW_ROOT="${OPENCLAW_ROOT:-$HOME/.openclaw}"
node --check "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_lib.mjs"
node --check "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_preflight.mjs"
node --check "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_diagnose.mjs"
node --check "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_restart.mjs"
node --check "$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_watchdog.mjs"
"$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_preflight.mjs" --for restart --json
"$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_restart.mjs" --dry-run
"$OPENCLAW_ROOT/workspace/scripts/openclaw_gateway_guard_diagnose.mjs"
Do not run an actual restart as a validation step while the user is actively using TUI unless the user asked for it.