From 102809dc2af4e572ab0fd57f3ccda48987c6cb72 Mon Sep 17 00:00:00 2001 From: hanghang zhang Date: Thu, 21 May 2026 11:05:28 +0100 Subject: [PATCH] fix(plugin): wakeup message says 'continue in same session', not 'only reply WAKEUP_OK' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit E2e showed the old wakeup text trapped agents in an ack-only loop: > "You have due slots. Follow the `hf-wakeup` workflow of skill > `hf-hangman-lab` to proceed. Only reply `WAKEUP_OK` in this session." The two clauses contradicted each other — "follow the workflow" vs "only reply WAKEUP_OK". MiniMax-M2.5 prioritised the literal "only" and never proceeded past the ack; the scheduler then re-woke every 30s because the slot stayed `not_started`, and the agent kept re-acking forever (verified: 3 consecutive WAKEUP_OK-only replies across slot 7). Rewrites the wakeup message to be explicit: - first line MUST be `WAKEUP_OK` (the ack token the plugin looks for) - then continue IN THE SAME session: drive calendar_status → task fetch → sub-workflow → calendar_complete/abort - flags the loop trap so the agent knows what to avoid Bumps version 0.3.3 → 0.3.4. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 (1M context) --- plugin/index.ts | 21 ++++++++++++++++----- plugin/package.json | 2 +- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/plugin/index.ts b/plugin/index.ts index 65b5c12..2058c21 100644 --- a/plugin/index.ts +++ b/plugin/index.ts @@ -127,7 +127,7 @@ function register(api: PluginAPI): void { }, openclaw: { version: api.runtime?.version || api.version || 'unknown', - pluginVersion: '0.3.3', // Bumped for PLG-CAL-004 + pluginVersion: '0.3.4', // Bumped for PLG-CAL-004 }, timestamp: new Date().toISOString(), }; @@ -162,7 +162,7 @@ function register(api: PluginAPI): void { const meta: OpenClawMeta = { version: api.runtime?.version || api.version || 'unknown', - plugin_version: '0.3.3', + plugin_version: '0.3.4', agents: agentNames.map(name => ({ name })), }; @@ -267,10 +267,21 @@ function register(api: PluginAPI): void { )}\n\`\`\``; } + // First-line ack `WAKEUP_OK` is the plugin's ack-receipt token; the + // agent MUST then continue in the same session and drive the + // `hf-wakeup` workflow to completion (calendar_status → task fetch → + // sub-workflow → calendar_complete/abort). Without that continuation + // the scheduler keeps re-waking every 30s because the slot stays + // `not_started` forever. const wakeupMessage = - `You have due slots. Follow the \`hf-wakeup\` workflow of skill ` + - `\`hf-hangman-lab\` to proceed. Only reply \`WAKEUP_OK\` in this ` + - `session.${slotBlock}`; + `You have due slots. **First line of your reply MUST be exactly ` + + `\`WAKEUP_OK\`** so the plugin records the ack. Then, **in this ` + + `same session**, drive the \`hf-wakeup\` workflow of skill ` + + `\`hf-hangman-lab\` to completion — read slot context, call the ` + + `harborforge_calendar_* tools, route to the right sub-workflow, ` + + `and finish with harborforge_calendar_complete or abort. Do NOT ` + + `stop after the ack — the scheduler will re-wake you every 30s ` + + `until the slot transitions out of \`not_started\`.${slotBlock}`; const result = await dispatchInboundMessageWithDispatcher({ ctx: { diff --git a/plugin/package.json b/plugin/package.json index afd2b44..f522042 100644 --- a/plugin/package.json +++ b/plugin/package.json @@ -1,6 +1,6 @@ { "name": "harbor-forge-plugin", - "version": "0.3.3", + "version": "0.3.4", "description": "OpenClaw plugin for HarborForge monitor bridge and CLI integration", "type": "module", "main": "dist/index.js",