fix(CLAUDE.md): .hermit-quit now cancels the recurring cron trigger, not just the current pass - #194
Merged
Merged
Conversation
…ot just the current pass (Closes #192) Superintendent cycle step 2 previously only skipped the current pass when .hermit-quit was found, leaving any session-only cron job registered in step 1 to keep firing /hermit every tick indefinitely. Step 2 now instructs calling CronList/CronDelete to actually cancel the recurring job before ending the pass, and notes that hermit run (a separate OS process, internal/runloop/runloop.go) already watches .hermit-quit itself and is unaffected. Applied the same fix to the CLAUDE.md.tmpl scaffold template used by `hermit init`.
Owner
Author
Superintendent review (HIGH risk — CLAUDE.mdがhigh-riskパスのため)diffを確認しました。
安全にマージできると判断します。 |
Owner
Author
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #192.
Superintendent cycle step 2 said
.hermit-quitis "a terminal stop" thatrequires starting
/hermitagain to resume — but in practice it onlyskipped work for the pass that detected the file. Any recurring
session-only cron job registered in step 1 kept firing
/hermiteverytick regardless, so every subsequent tick burned a full pass just to
re-detect the same quit file, until the Claude session itself expired
(up to 7 days) or someone manually ran
CronDelete.CLAUDE.md's Superintendent cycle step 2 to explicitly callCronListto find the recurring/hermitjob andCronDeletetocancel it before ending the pass, so quit actually stops the
autonomous loop rather than just leaving it spinning on no-ops.
hermit run(Issue hermit run: ループを Claude Code セッションの外に出し、HERMIT 自身のプロセスが所有する #181 / PR feat(run): add hermit run — Superintendent loop owned by HERMIT's own process #189,internal/runloop/runloop.go):it's a separate OS process loop that already watches
.hermit-quitdirectly (
runloop.go:145) and stops its own tick loop — it neverregisters or depends on session-only
CronCreate/CronList/CronDeletejobs, so it isn't affected by this bug. Noted this explicitly in the
step 2 text so the distinction is documented rather than assumed.
cmd/hermit/templates/CLAUDE.md.tmpl(the scaffold used by
hermit init) to keep the two in sync, perexisting repo convention.
.hermit-pausedhandling (step 3), and step 1'scron-registration logic untouched — this is purely additive detail
inside step 2, no steps inserted/removed/renumbered.
Assumptions
inserting new top-level numbered steps, to avoid renumbering every
step that's cross-referenced by number elsewhere in the document
(e.g. step 5/6/7's back-references). This satisfies the Issue's
scope constraint ("changed only step 2's procedure").
content/structure beyond substring checks in
cmd/hermit/inprocess_test.go(e.g. presence of### Superintendent cycle (one pass, run inline), which still pass;no new test was added since this is a documentation-only change with
no new tool-calling behavior to unit test.
Test plan
go build ./...go test ./cmd/hermit/... ./internal/runloop/...(all pass)CLAUDE.mdvscmd/hermit/templates/CLAUDE.md.tmplto confirm step 2 text stayed in sync