Skip to content

feat/add watchdog#2362

Open
SergeiHanus wants to merge 2 commits into
nanocoai:mainfrom
SergeiHanus:feat/add-watchdog
Open

feat/add watchdog#2362
SergeiHanus wants to merge 2 commits into
nanocoai:mainfrom
SergeiHanus:feat/add-watchdog

Conversation

@SergeiHanus

@SergeiHanus SergeiHanus commented May 9, 2026

Copy link
Copy Markdown

Type of Change

  • Feature skill - adds a channel or integration (source code changes + SKILL.md)
  • Utility skill - adds a standalone tool (code files in .claude/skills/<name>/, no source changes)
  • Operational/container skill - adds a workflow or agent skill (SKILL.md only, no source changes)
  • Fix - bug fix or security fix to source code
  • Simplification - reduces or simplifies source code
  • Documentation - docs, README, or CONTRIBUTING changes only

Description

Install the NanoClaw watchdog — a systemd timer that runs every 15 minutes to detect failed/stuck digest sessions and invokes Claude Code to auto-remediate before the user notices messages stopped. Detects three failure modes: dead recurring series (status=failed AND recurrence IS NOT NULL), stuck processing (status=processing >45 min with stale heartbeat), and service down. Use when the user wants proactive failure detection and auto-recovery.

For Skills

  • SKILL.md contains instructions, not inline code (code goes in separate files)
  • SKILL.md is under 500 lines
  • I tested this skill on a fresh clone

…d auto-remediation

Installs a systemd timer (15 min) that detects three failure modes:
- Dead recurring series: status=failed AND recurrence IS NOT NULL
- Stuck processing: status=processing >45 min with stale heartbeat
- Service down: systemctl --user is-active returns non-zero

On detection, invokes claude --dangerously-skip-permissions with a
structured prompt to auto-remediate and inject a task row into inbound.db
so the agent notifies the user via their channel.

Ships:
- scripts/watchdog.ts        detection logic (queries agent_groups.name)
- scripts/watchdog-prompt.ts prompt builder + claude invocation
- setup/watchdog.{service,timer} systemd units
- setup/install-watchdog-timer.sh installer
@github-actions github-actions Bot added follows-guidelines PR was created using the current contributing template PR: Skill Skill package or skill-related changes labels May 9, 2026
@SergeiHanus SergeiHanus changed the title fFeat/add watchdog feat/add watchdog May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

follows-guidelines PR was created using the current contributing template PR: Skill Skill package or skill-related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant