You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: Problem
When the LLM outputs a malformed heartbeat response like HEARTBEAT_OK_OK_OK instead of the expected HEARTBEAT_OK, the stripHeartbeatToken function fails to fully clean the response, resulting in spam messages like _OK_OK_OK... being sent to users at random intervals.
Root Cause
The function at src/web/auto-reply.ts uses a regex that only replaces exact matches of HEARTBEAT_OK. When the LLM hallucinates repetitive patterns, the trailing _OK_OK remains and gets sent as a message.
Current behavior:
Input: "HEARTBEAT_OK_OK_OK"
After token strip: "_OK_OK"
After underscore->space: " OK OK"
After trim: "OK OK"
Result: shouldSkip=false, text="OK OK" ← SENT TO USER!
Expected Behavior
All HEARTBEAT_OK* patterns should be stripped, including any trailing _OK repetitions.
Proposed Fix
Add a regex to strip trailing _OK patterns after the initial token replacement:
// After removing HEARTBEAT_OK token
processed = processed.replace(/(\s*_?OK)+$/gi, "");
Thanks for the detailed repro. Fixed: strip repeated HEARTBEAT_OK tails so malformed heartbeat replies won’t leak "OK OK" spam. Added tests; will ship in next beta.
Activity
steipete commentedon Dec 23, 2025
Thanks for the detailed repro. Fixed: strip repeated HEARTBEAT_OK tails so malformed heartbeat replies won’t leak "OK OK" spam. Added tests; will ship in next beta.
steipete commentedon Dec 23, 2025
This is quite specific, but I'm ok with making this more resilient. 56245d5
Merge pull request #41 from dgarson/gemini-smart-capture-and-more
Merge pull request openclaw#41 from harborworks/feature/telegram-chan…
feat: enhance ClawHub integration with new CLI paths and IPC handlers…
docs(feishu): 修复 JSON 示例引号缺失问题并添加完整配置示例