🦀 ClawHub
Error Recovery Automation
by @konscious0beast
Standardize handling of common OpenClaw errors (gateway restart, browser service unavailable, cron failures) with automated recovery steps. Use when you need...
⚡ When to Use
💡 Examples
Example 1: Gateway Recovery Automation
Script: scripts/gateway-recovery.sh (see template above). Cron schedule: every 1 hour. Announce only on failure.
Example 2: Browser Recovery Automation
Script: scripts/browser-recovery.sh (see template above). Cron schedule: every 30 minutes. Announce only on failure.
Example 3: Combined Health‑Check + Recovery
A single script that checks multiple services and recovers any that are unhealthy. Useful for a comprehensive “keep‑alive” cron job.
#!/bin/bash
set -elog() { echo "[$(date +'%Y-%m-%d %H:%M:%S')] $*"; }
Check gateway
if ! openclaw gateway status > /dev/null 2>&1; then
log "Gateway unhealthy, restarting..."
openclaw gateway restart
sleep 5
fiCheck browser
if ! openclaw browser --browser-profile openclaw status --json 2>&1 | grep -q '"running":true'; then
log "Browser unhealthy, restarting..."
openclaw browser --browser-profile openclaw stop
sleep 2
openclaw browser --browser-profile openclaw start
sleep 8
filog "All services healthy"
exit 0
Schedule this script every 30 minutes with an isolated agentTurn job.
TERMINAL
clawhub install error-recovery-automation