error-guard
⚠️ System‑level skill (Advanced users)
This skill defines the control‑plane safety primitives for OpenClaw.
It is intentionally minimal, non‑blocking, and designed to prevent agent freezes, deadlocks, and unrecoverable states when running long‑lived or high‑risk workloads.
Design Principles
Warning: This skill operates at the agent control‑plane level.
It should be installed only by users who understand OpenClaw’s execution model and are running workloads that can block, hang, or run for extended periods.
- Main agent never blocks: no long exec, no external I/O, no LLM calls.
- Event-driven: workers emit events; the control plane listens.
- Fail-safe first: recovery commands must always respond.
- Minimal state: track only task metadata (never payloads).
Command Surface (Phase 1)
/status
Report current system health and task registry state.
Returns:
- Active tasks (taskId, type, state)
- Start time and last heartbeat
- Flags for stalled or overdue tasks
Constraints:
- Must run in constant time
- Must not call any model or external API
/flush
Emergency stop.
Immediately:
- Cancel all active tasks
- Kill active exec/process sessions
- Clear pending message queue
- Reset in-memory task registry
Constraints:
- Must always respond
- No waiting on workers
- No model calls
/recover
Safe recovery sequence.
Steps:
- Execute
/flush
- Reset control-plane state
- Optionally reload skills/state (no container restart)
Future Extensions (Not Implemented Yet)
- Sub-agent runner helper (event-driven)
- Task watchdogs with TTL and silence detection
- Structured event protocol (task.started, task.heartbeat, task.completed, ...)
- Back-pressure and task classes (interactive / batch / background)
Security & Privacy
- This skill does not store payloads, prompts, messages, or model outputs
- Only minimal task metadata is persisted (taskId, timestamps, state)
- No API keys, credentials, or user data are read or written
- Safe to publish and share publicly
Non-Goals
- No business logic
- No background polling loops
- No user-facing features
- No LLM reasoning paths
This skill is the last line of defense. Keep it small, fast, and reliable.
1---2name: error-guard3description: error-guard4---56# error-guard78⚠️ **System‑level skill (Advanced users)**910This skill defines the **control‑plane safety primitives** for OpenClaw.11It is intentionally minimal, non‑blocking, and designed to prevent agent freezes, deadlocks, and unrecoverable states when running long‑lived or high‑risk workloads.1213## Design Principles1415> **Warning:** This skill operates at the agent control‑plane level.16> It should be installed only by users who understand OpenClaw’s execution model and are running workloads that can block, hang, or run for extended periods.1718- **Main agent never blocks**: no long exec, no external I/O, no LLM calls.19- **Event-driven**: workers emit events; the control plane listens.20- **Fail-safe first**: recovery commands must always respond.21- **Minimal state**: track only task metadata (never payloads).2223## Command Surface (Phase 1)2425### /status2627Report current system health and task registry state.2829Returns:30- Active tasks (taskId, type, state)31- Start time and last heartbeat32- Flags for stalled or overdue tasks3334Constraints:35- Must run in constant time36- Must not call any model or external API3738### /flush3940Emergency stop.4142Immediately:43- Cancel all active tasks44- Kill active exec/process sessions45- Clear pending message queue46- Reset in-memory task registry4748Constraints:49- Must always respond50- No waiting on workers51- No model calls5253### /recover5455Safe recovery sequence.5657Steps:581. Execute `/flush`592. Reset control-plane state603. Optionally reload skills/state (no container restart)6162## Future Extensions (Not Implemented Yet)6364- Sub-agent runner helper (event-driven)65- Task watchdogs with TTL and silence detection66- Structured event protocol (task.started, task.heartbeat, task.completed, ...)67- Back-pressure and task classes (interactive / batch / background)6869## Security & Privacy7071- This skill **does not** store payloads, prompts, messages, or model outputs72- Only minimal task metadata is persisted (taskId, timestamps, state)73- No API keys, credentials, or user data are read or written74- Safe to publish and share publicly7576## Non-Goals7778- No business logic79- No background polling loops80- No user-facing features81- No LLM reasoning paths8283This skill is the **last line of defense**. Keep it small, fast, and reliable.