Skip to content

claude-code-hermit: migrate heartbeat from CronCreate to CC Monitor#132

Merged
gtapps merged 3 commits into
mainfrom
worktree-feat-improve-heartbeat
May 23, 2026
Merged

claude-code-hermit: migrate heartbeat from CronCreate to CC Monitor#132
gtapps merged 3 commits into
mainfrom
worktree-feat-improve-heartbeat

Conversation

@gtapps
Copy link
Copy Markdown
Owner

@gtapps gtapps commented May 23, 2026

Summary

Verification

  • Tests: pass (14.1s)

Fixes #128

OK/SKIP ticks now run as a silent bash subprocess — zero LLM wakes when
quiet. EVALUATE/AUTO_CLOSE notifications interrupt mid-task (Monitor
semantics, bounded by precheck suppression). Adds --peek mode to
heartbeat-precheck.js to avoid double-incrementing total_ticks on
noteworthy ticks, and fixes the self-eval-at-tick-20 off-by-one that
would have caused peek to fire EVALUATE one tick too late. Deprecates
heartbeat.show_ok. Gives heartbeat its own runtime state file
(state/heartbeat-monitor.runtime.json) independent of /watch.
@gtapps
Copy link
Copy Markdown
Owner Author

gtapps commented May 23, 2026

Code review

Found 1 issue:

  1. session-close/SKILL.md line 15 is stale immediately on landing: the line gets rewritten from /loop to CronCreate, but this PR is the one migrating heartbeat away from CronCreate to CC Monitor. The new wording will mislead operators (and an LLM following the skill) into thinking heartbeat is still a CronCreate entry and reaching for CronDelete rather than TaskStop. Should reference the Monitor (or just "the heartbeat") instead.

Idle transitions happen automatically at task boundaries (handled by the `session` skill). By the time the operator runs `/session-close`, they want out.
If heartbeat is running, stop it before archiving. **Skip on `--auto`** — heartbeat is the caller; stopping its CronCreate would prevent all future ticks.
If watches are registered (`state/monitors.runtime.json` has entries), stop all watches before archiving — invoke `/claude-code-hermit:watch stop --all`.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

PR #132 migrates heartbeat to CC Monitor, but session-close/SKILL.md
line 15 was rewritten from "/loop" to "CronCreate" — stale on landing.
Update to "Monitor" to match the new mechanism so --auto callers don't
reach for CronDelete instead of TaskStop.
@gtapps
Copy link
Copy Markdown
Owner Author

gtapps commented May 23, 2026

@copilot resolve the merge conflicts in this pull request

Copy link
Copy Markdown
Contributor

Copilot AI commented May 23, 2026

@copilot resolve the merge conflicts in this pull request

Resolved by merging origin/main into this branch in bad3c5e. The branch is now conflict-free and tests still pass (bash tests/run-all.sh).

Copilot finished work on behalf of gtapps May 23, 2026 20:28
@gtapps gtapps merged commit 784696f into main May 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(hermit): Migrate heartbeat from /loop CronCreate to CC Monitor for zero-cost quiet ticks

2 participants