ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified productivity Safety 4/5

task-watchdog

任务锁与超时监控系统。外部文件承载任务状态,不污染 agent 上下文,纯靠 heartbeat + GRACE 判断,不发即时告警。

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/axelhu/task-watchdog-axel
Or

What This Skill Does

The task-watchdog skill provides a robust, file-based persistence layer for managing long-running tasks in OpenClaw. Unlike volatile in-memory state tracking, this skill creates dedicated lock files within ~/.openclaw/agents/{agent_id}/locks/ to maintain the lifecycle of your agentic workflows. It decouples task status from the agent's active memory, allowing for seamless recovery after crashes or restarts. The system utilizes two distinct timing markers: last_heartbeat for system presence and last_progress for actual task progression, ensuring that stalled tasks are identified correctly without generating false-positive alerts. It is designed for reliability, enabling agents to self-heal by identifying dead sessions and reassigning or cleaning up abandoned tasks automatically.

Installation

To integrate task-watchdog into your OpenClaw environment, execute the following command in your terminal:

clawhub install openclaw/skills/skills/axelhu/task-watchdog-axel

Ensure that your agent has write permissions for the ~/.openclaw/ directory to allow for lock file management and archival processes.

Use Cases

  • Long-running Batch Processing: Ideal for multi-step tasks like web scraping or large dataset analysis that may take hours or days to complete.
  • Agent Resilience: Automatically resumes interrupted tasks after an agent process crash by detecting abandoned session IDs.
  • Workload Auditing: Allows administrators or developers to generate reports on pending, stalled, or completed tasks using the built-in lock-report and lock-archive utilities.
  • Automated Housekeeping: Regularly clears out legacy task data to maintain a clean environment using the customizable cleanup parameters.

Example Prompts

  • "OpenClaw, initialize the data-collection task and create a lock file so I can track the progress later."
  • "Update the task status for the current session to show that the second phase of the analysis is now complete."
  • "Run the self-check diagnostic to see if there are any stalled tasks from my previous sessions that I need to resume."

Tips & Limitations

  • Not for Instant Alerts: This skill is focused on state management, not real-time push notifications. Use it to build a reliable history of what your agents are doing.
  • Use Progress Wisely: Always update the last_progress field at meaningful checkpoints. Relying solely on the last_heartbeat might mask situations where an agent is running but not doing any work.
  • Scheduling: Set up a cron job or an agent loop to trigger lock-self-check.sh periodically to ensure that dead sessions are cleaned up or handed over without manual intervention.
  • Storage Limits: Periodically run lock-archive.sh --cleanup-days 30 to prevent the locks/ directory from growing too large over time.

Metadata

Author@axelhu
Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-axelhu-task-watchdog-axel": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#task-management#persistence#automation#resilience
Safety Score: 4/5

Flags: file-write, file-read