Skip to content

Your lightweight open-source personal agent.

fix: correct heartbeat token matching logic

Cheng Wang3ba0191cef22
diff --git a/nanobot/heartbeat/service.py b/nanobot/heartbeat/service.py
index 4cb469e10..221ed27d9 100644
--- a/nanobot/heartbeat/service.py
+++ b/nanobot/heartbeat/service.py
@@ -115,7 +115,7 @@ class HeartbeatService:
response = await self.on_heartbeat(HEARTBEAT_PROMPT)
# Check if agent said "nothing to do"
- if HEARTBEAT_OK_TOKEN in response.upper().replace("_", ""):
+ if HEARTBEAT_OK_TOKEN.replace("_", "") in response.upper().replace("_", ""):
logger.info("Heartbeat: OK (no action needed)")
else:
logger.info(f"Heartbeat: completed task")