← ClaudeAtlas

agentic-process-monitorlisted

Monitor background processes from Claude Code using sentinel files, heartbeat liveness, and subagent polling. Best practices and.
terrylica/cc-skills · ★ 49 · AI & Automation · score 79
Install: claude install-skill terrylica/cc-skills
# Agentic Process Monitor Patterns for monitoring background processes from Claude Code — detecting success, failure, timeout, and hung processes, then returning results to the main context to drive the next action. **Companion skills**: `devops-tools:pueue-job-orchestration` (remote/queued work) | `devops-tools:distributed-job-safety` (concurrency) --- > **Self-Evolving Skill**: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues. ## Architecture: Sentinel + Heartbeat + Agent ``` Main Context Monitor Agent (subagent) ───────────── ────────────────────── 1. Start work (Bash run_in_background) └─ work wrapper writes sentinel files 2. Launch Agent (poll every 15s) ────► poll loop: 3. Continue other work .status exists? → return result .heartbeat stale? → kill, return error elapsed > max? → kill, return timeout 4. Agent returns ◄──────────���───────── detected outcome 5. Act on result (next step / retry / abort) ``` **Why this architecture**: The main context stays lean (no polling tokens burned). The subagent handles all the waiting. If the subagent itself fails, the main context can recover by checking sentinel files directly. --- ## Sentinel Protocol The work process writes 4 files t