The wolf forgot how to script#347
Open
LElkUNP wants to merge 1 commit into
Open
Conversation
fire_cron() was always calling dispatch_session() regardless of the action field, so every cron with "action": "script" silently spawned an empty Claude Code session with no prompt — dispatch_session bailed on the missing prompt, the session was reaped, and the bash command never ran. Adds dispatch_script() and routes fire_cron() by action type. Defaults to "session" so any cron without an explicit action keeps current behavior. Notifications stay quiet for script crons unless they declare notify: — no need to howl every two minutes for a heartbeat keepalive. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Someone is attempting to deploy a commit to the jerpint's projects Team on Vercel. A member of the Team first needs to authorize it. |
This was referenced May 29, 2026
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.
What happened
Loup wakes up on schedule, howls, marks the cron "dispatched" in
jobs.jsonl— but nothing actually runs. Every wolt with a"action": "script"cron inwolf.jsonhas been silently spawning empty Claude Code sessions instead of executing its shell command. The session has noprompt, sodispatch_session()bails. The session is reaped seconds later. No bash runs, no apps come back up, no digest fires, no Loucie watcher polls — but the howl keeps going every cycle so it looks fine from the outside.This lab's apps-keepalive (Milo/
apps-keepalive.sh) is the most visible casualty — onboarding portal, ressources, calendar widget, radicale, and four Slack/Telegram bots all silently die after the first container rebuild. La Trame'sstart-appscron is the same. Found while testing rebuild survival after migrating to a named tunnel — apps wouldn't come back up, which led to discovering Loup wasn't actually running anything.Root cause
fire_cron()incontainer/creatures/wolf.pyunconditionally callsdispatch_session()regardless of theactionfield:The
action: "script"schema documented in existingwolf.jsonfiles across the platform (Loup, la-trame) is unimplemented — the field is read but never branched on.What changed
dispatch_script(entry)helper — runsentry["command"]viasubprocess.Popenwithstart_new_session=True(fire-and-forget, doesn't block the wolf loop).fire_cron()now readsentry.get("action", "session")and routes:action: "script"→dispatch_script()→ logs asaction: "script"injobs.jsonldispatch_session()→ unchanged behavior.notify:field. Heartbeat keepalives shouldn't howl every two minutes.Backwards compatible: any cron without an explicit
actioncontinues to be treated as a session, matching the pre-patch behavior.Test plan
"action": "script"(Loup'sapps-keepalive, every 2 min): rebuild container, wait for next*/2tick, all 5 services come up within 15 seconds. Confirmed twice across two consecutive rebuilds.jobs.jsonldistinguishesaction: "script"fromaction: "session"events.main(2ca2fd4) before the patch — every script cron in this colony's wolves was a no-op for ~6 weeks.🐺 the wolf can speak bash again