fix(wakeup): drop WAKEUP_OK ack-token theatre from wakeup message #10
Reference in New Issue
Block a user
Delete Branch "fix/drop-wakeup-ok-token"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
The wakeup dispatcher's
delivercallback only doeslogger.info(reply.slice(0,100))— no token detection, no scheduler state change. The "first line of your reply MUST be exactlyWAKEUP_OKso the plugin records the ack" instruction inwakeupMessagewas prompt theatre nothing acted on.Confirmed by:
plugin/index.ts:335—deliver: async (payload) => logger.info(...)(no ack handling)openclaw/dist/plugin-sdk/src/auto-reply/tokens.d.ts— declaresHEARTBEAT_OKandSILENT_REPLYtokens, nothing for wakeupopenclaw/dist/heartbeat-runner-*.jsimportsHEARTBEAT_TOKENand callsstripHeartbeatToken()— equivalent machinery for the wakeup path simply doesn't existworkflows/hf-wakeup/flow.mdAppendix had a wandering note: "if the plugin re-wakes you every 30s after WAKEUP_OK, this is the known plugin bug" — i.e. the doc already conceded the ack doesn't do anythingSymptom in the wild
Every wakeup turn the agent burns a token on echoing
WAKEUP_OK, and prompt material gets spent explaining a no-op handshake. Worst case: when the scheduler keeps re-waking (becausenot_started→ongoingPATCH isn't implemented server-side either) agents loop, re-ack each wake, and never escape the noise — exactly what we observed on prod t2 2026-05-26 (272 queued messages, 1645ReplyRunAlreadyActiveError, separate root cause: monitor.hangman-lab.top NXDOMAIN, but the WAKEUP_OK theatre amplified it).Fix
Rewrite
wakeupMessageto tell the agent the actual truth:The retained
WAKEUP_OKmention inindex.ts:310-315is a "this used to be a thing but isn't" comment — left in deliberately so future readers don't re-invent the convention.Companion change
ClawSkills
d0109f3removesWAKEUP_OKfromskills/hf-hangman-lab/SKILL.md+workflows/hf-wakeup/flow.md. Both repos should land together; the order doesn't matter (each is independently correct after merge).Behaviour change
None at runtime. Plugin code path is unchanged — only the string sent to the agent is shorter and more honest. Already-running agents will pick up the new wakeupMessage on the next gateway restart that loads the new plugin.