openclaw-ops
Use when installing, configuring, troubleshooting, securing, or performing a health check on OpenClaw gateway setups — including channel integrations, exec approvals, cron jobs, agent sessions, and operational maintenance.
git clone https://github.com/cathrynlavery/openclaw-ops
git clone --depth=1 https://github.com/cathrynlavery/openclaw-ops ~/.claude/skills/cathrynlavery-openclaw-ops-openclaw-ops
git clone --depth=1 https://github.com/cathrynlavery/openclaw-ops ~/.openclaw/skills/cathrynlavery-openclaw-ops-openclaw-ops
SKILL.mdOpenClaw Ops
You are an expert OpenClaw administrator. Use the scripts below to diagnose and fix issues — they contain the implementation logic. Reach for scripts first; only write manual steps when no script covers the case.
Reference Documentation
- cli-reference.md — Complete CLI command reference
- troubleshooting.md — Common issues and solutions
- channel-setup.md — Platform-specific setup guides
- security-guide.md — Active security defense guide
- docs.openclaw.ai — Official documentation
Scripts
All scripts live in
scripts/ relative to this skill (typically ~/.openclaw/skills/openclaw-ops/scripts/). Always use that full path when suggesting commands to users.
| Script | When to use |
|---|---|
| First thing on any health check — fixes gateway, auth mode, exec approvals, crons, and stuck sessions in one pass |
| Run after — orchestrates check-update, heal, workspace reconcile, security scan, and final health check in sequence |
| Continuous monitoring; run every 5 min via LaunchAgent. HTTP health check → auto-restart → escalation after 3 failures |
| Set up the watchdog as a macOS LaunchAgent (survives reboots) |
| Remove the LaunchAgent |
| After a version change — detects breaking config changes, explains them; to auto-repair |
| URL/process health checks for gateway-adjacent services; copy first |
| Agent is alive but misbehaving — retry loops, hangs, auth loops, noisy failures |
| Search session history by keyword; redacts secrets by default |
| Build a readable markdown resume for a single session (compaction-first, then point-of-failure) |
| Report bootstrap truncation warnings from the latest session per agent. Use when users say “prompt too long,” “instructions too long,” or the bootstrap context looks incomplete. |
| Audit agent cron jobs for missing ; enables it and adds a default thinking level only when one is not already set. |
| Format erroring cron jobs from cron state, including last error, reason, consecutive count, last-run age, and a truncated payload preview. |
| Audit unconfigured dirs under . Default is dry-run; moves dormant dirs to , removes empty dirs. |
| Rotate generic files across , grouped by the path prefix before . Keeps the newest N per group; dry-run by default, to delete. |
| Audit AGENTS.md, MEMORY.md, and SOUL*.md for file bloat. Reports path, token estimate (chars/4), and mtime, ranked largest-first above a token threshold. |
| Reclaim disk + cut session context bloat. Purges stale session index entries, orphan cron/subagent sessions, old files, and orphan transcripts. Dry-run by default; to execute. |
| Incident, activity, watchdog, and cost summary for the last N hours |
| Sourced helper for incident lifecycle (used by session-monitor and other scripts) |
| Before — scan skill for secrets, injection, dangerous commands; outputs LOW/MEDIUM/HIGH risk score |
| Config hardening compliance check (0-100); for auto-repair; for file change detection; to scan for leaked secrets |
| Check/fix four GPT-5.x performance opt-ins (strict execution, personality overlay, thinking level, Codex harness). Requires v2026.4.x+. to apply. |
Quick start examples
# One-pass heal: bash scripts/heal.sh # Install always-on watchdog (macOS): bash scripts/watchdog-install.sh # Check GPT-5.x agent performance settings: bash scripts/codex-perf-check.sh bash scripts/codex-perf-check.sh --fix # apply fixes # Run behavioral session monitoring: bash scripts/session-monitor.sh --verbose # Search sessions for auth failures: bash scripts/session-search.sh "unauthorized" --limit 10 # Build a resume for one session: bash scripts/session-resume.sh ~/.openclaw/agents/knox/sessions/<session>.jsonl # Check bootstrap truncation warnings: bash scripts/prompt-truncation-report.sh bash scripts/prompt-truncation-report.sh --agent atlas --json # Audit cron jobs for missing light-context: bash scripts/cron-optimize.sh bash scripts/cron-optimize.sh --fix --level low # Inspect cron failures: bash scripts/cron-error-inspector.sh bash scripts/cron-error-inspector.sh --agent atlas --consecutive 2 # Audit unconfigured agent dirs: bash scripts/agent-dirs-audit.sh bash scripts/agent-dirs-audit.sh --archive --delete-empty # Rotate old backup files: bash scripts/backup-rotate.sh bash scripts/backup-rotate.sh --apply --keep 3 # Audit oversized context files: bash scripts/context-audit.sh bash scripts/context-audit.sh --agent atlas --threshold-tokens 10000 --json # Reclaim disk + trim session bloat (dry-run first): bash scripts/session-purge.sh bash scripts/session-purge.sh --apply # all agents, 7d cutoff bash scripts/session-purge.sh --agent atlas --apply # single agent # 24-hour digest: bash scripts/daily-digest.sh --hours 24 # Security compliance check: bash scripts/security-scan.sh bash scripts/security-scan.sh --fix
Step 0: Version Gate
Always verify v2026.2.12 or later before doing anything else. Versions before this contain CVE-2026-25253 (one-click RCE via gateway token leakage) and 40+ additional fixes.
openclaw --version
If outdated:
curl -fsSL https://openclaw.ai/install.sh | bash && openclaw gateway restart
After any version upgrade, run
check-update.sh to catch breaking config changes.
Fix Priority (Health Check Order)
- Auth issues — blocks all agent activity
- Exec approvals — empty allowlists cause silent failures that mimic auth or session bugs
- Auto-disabled crons — silent failures, easy to miss
- Stuck sessions — agent appears unresponsive
- Config errors — causes restart warnings
heal.sh follows this order automatically.
Discover Agents
Before checking sessions, exec approvals, or crons — discover the actual agent list:
openclaw agents list # requires running gateway ls ~/.openclaw/agents/ # fallback if gateway is down
Non-Script Areas
These require manual steps because no script covers them yet.
Auth
Read
~/.openclaw/auth-profiles.json — verify tokens present for all configured profiles.
If broken:
openclaw models auth setup-token --provider anthropic
Note: Anthropic OAuth tokens are blocked for OpenClaw — only direct API keys work.
Exec Approvals
Two independent layers — both must be correct or agents stall silently.
Layer 1 — per-agent allowlists (named entries with empty
[] shadow the * wildcard):
openclaw approvals get # For each agent with an empty allowlist: openclaw approvals allowlist add --agent <name> "*"
Layer 2 — policy settings (often reset by updates):
openclaw config set tools.exec.security full openclaw config set tools.exec.strictInlineEval false openclaw gateway restart
Check
~/.openclaw/exec-approvals.json defaults block: security: full, ask: off, askFallback: full.
Channels
BlueBubbles:
/blocked URL fetch
→ setBlocked hostname
inallowPrivateNetwork: true
, restartchannels.bluebubbles
→ tapback/reaction/read receipt; check BlueBubbles webhook configdebounce flush failed: TypeError … null (reading 'trim')
should beserverUrlhttp://127.0.0.1:1234
Slack:
→ bot token expired; refreshinvalid_auth
in openclaw.jsonbotToken
→ same fixsocket mode failed to start
See channel-setup.md for all platforms.
Quick Diagnostic Commands
openclaw status # Quick status summary openclaw status --all # Full diagnosis with log tail openclaw status --deep # Health checks with provider probes openclaw health # Quick health check openclaw doctor # Diagnose issues openclaw doctor --fix # Auto-fix common problems openclaw security audit --deep
Error Patterns
| Error | Cause | Fix |
|---|---|---|
| Slack OAuth scope missing | Add scopes, reinstall app |
| Service not running | |
| Port conflict | |
| Invalid API key/token | |
| Unknown sender | |
| Removed in v2026.1.29 | |
| Anthropic blocked OpenClaw OAuth | |
| Sub-agent depth limit | Increase |
| Discord resume logic failure | |
timeout | Named agent has empty allowlist shadowing | + restart |
from agent | Exec approval gate blocking commands | Fix allowlists (see Exec Approvals above) |
Security Operations
Run
security-scan.sh for config hardening compliance, drift detection, and credential scanning. Run skill-audit.sh before installing any third-party skill.
Recommended settings:
:gateway.bindloopback
:gateway.auth.modetoken
:gateway.mdns.modeminimal
:dmPolicypairing
:groupPolicyallowlist
:sandbox.mode
,all
:sandbox.scopeagent
:tools.deny["gateway", "cron", "sessions_spawn", "sessions_send"]
:security.trust_model.multi_user_heuristic
(v2026.2.24+)true
See security-guide.md for full details.
Installation
Requirements: Node.js v22+, macOS or Linux (Windows: WSL2/Ubuntu)
curl -fsSL https://openclaw.ai/install.sh | bash openclaw onboard --install-daemon openclaw status
Key Config Paths
| Path | Purpose |
|---|---|
| Main configuration |
| Agent state and sessions |
| Channel credentials |
| Installed skills |
| Installed plugins |
When Helping Users
- Check version first — v2026.2.12+ required
- Run
before manual fixes — it handles auth, exec approvals, crons, sessions in one passheal.sh - Preserve existing config — read before modifying
- Security first — default to restrictive settings
- Explain changes — tell users what you're doing and why
- Verify after changes — confirm with status commands
- Use API keys, not OAuth — Anthropic has blocked OAuth tokens for OpenClaw
- Audit third-party skills/plugins — run
before installingskill-audit.sh
After Fixes
Note if gateway restart is needed. Summarize in three buckets: broken, fixed, needs manual action.