openclaw - 💡(How to fix) Fix [Bug] Telegram unusable: heartbeat creates isolated session, user loses conversation context [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#73297Fetched 2026-04-29 06:21:20
View on GitHub
Comments
2
Participants
2
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
commented ×2closed ×1
RAW_BUFFERClick to expand / collapse

Bug Description

When heartbeat fires, it creates an isolated session as expected — but the user's Telegram connection gets routed into the heartbeat session instead of staying in the original conversation session. The user's messages are effectively "hijacked" into the isolated heartbeat session, losing all prior context.

Expected Behavior

  • Heartbeat runs in its own isolated :heartbeat session (sandbox)
  • User's Telegram messages continue routing to their original session
  • User gets answers from their original session
  • Heartbeat does not interfere with the user's conversation session

Actual Behavior

  • Heartbeat fires → creates isolated session
  • User's Telegram messages get routed into the heartbeat session
  • Agent has no memory of prior conversation (only heartbeat events)
  • User is stuck in heartbeat session, original conversation context lost

Fix Required

Heartbeat isolated mode should isolate ONLY the heartbeat execution. The user's Telegram channel should remain attached to the user's original session — heartbeat runs in its own session without stealing the user's session affinity.

Related Issues

#71581 — Honor session.dmScope for exec-event/cron-event heartbeat wakes #72394 — Transfer pending system event entries across isolated heartbeat session boundary

extent analysis

TL;DR

The heartbeat mechanism needs to be modified to prevent it from hijacking the user's Telegram connection, ensuring that user messages continue to route to their original conversation session.

Guidance

  • Review the session management logic to ensure that the heartbeat session is properly isolated and does not interfere with the user's conversation session.
  • Investigate the session.dmScope configuration, as mentioned in related issue #71581, to determine if it can be used to prevent the heartbeat session from overriding the user's session affinity.
  • Examine the event handling mechanism to ensure that user messages are not being incorrectly routed to the heartbeat session.
  • Consider implementing a mechanism to transfer pending system event entries across isolated session boundaries, as mentioned in related issue #72394.

Example

No code snippet is provided due to lack of specific implementation details.

Notes

The fix may require modifications to the session management and event handling mechanisms, and may involve resolving related issues #71581 and #72394.

Recommendation

Apply a workaround to modify the heartbeat mechanism to prevent session hijacking, as upgrading to a fixed version is not mentioned in the issue. This is because the issue implies that a code change is required to fix the problem, rather than simply upgrading to a newer version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug] Telegram unusable: heartbeat creates isolated session, user loses conversation context [2 comments, 2 participants]