openclaw - 💡(How to fix) Fix Telegram DM stalls behind embedded auto-compaction session

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…

Telegram DM ingress works, but a message appeared lost because the Telegram direct session was queued behind active work during embedded auto-compaction. The gateway later sent a response, but only after compaction/session takeover errors.

Error Message

20:12:53 [telegram] Inbound message <telegram-user> -> <bot> (direct, 6 chars) 20:12:59 [agent/embedded] embedded run auto-compaction start: reason=overflow 20:14:34 [agent/embedded] embedded run auto-compaction complete: reason=overflow compactionCount=1 willRetry=true 20:15:00 [diagnostic] long-running session: sessionKey=agent:main:telegram:direct:<telegram-user> state=processing age=120s queueDepth=1 reason=queued_behind_active_work activeWorkKind=model_call 20:16:15 [agent/embedded] compaction retry aggregate timeout (60000ms): proceeding with pre-compaction state 20:16:15 [diagnostic] lane task error: lane=main error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released" 20:16:15 [diagnostic] lane task error: lane=session:agent:main:telegram:direct:<telegram-user> error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released" 20:16:19 [telegram] outbound send ok operation=sendVoice deliveryKind=voice

Root Cause

Telegram DM ingress works, but a message appeared lost because the Telegram direct session was queued behind active work during embedded auto-compaction. The gateway later sent a response, but only after compaction/session takeover errors.

Code Example

20:12:53 [telegram] Inbound message <telegram-user> -> <bot> (direct, 6 chars)
20:12:59 [agent/embedded] embedded run auto-compaction start: reason=overflow
20:14:34 [agent/embedded] embedded run auto-compaction complete: reason=overflow compactionCount=1 willRetry=true
20:15:00 [diagnostic] long-running session: sessionKey=agent:main:telegram:direct:<telegram-user> state=processing age=120s queueDepth=1 reason=queued_behind_active_work activeWorkKind=model_call
20:16:15 [agent/embedded] compaction retry aggregate timeout (60000ms): proceeding with pre-compaction state
20:16:15 [diagnostic] lane task error: lane=main error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released"
20:16:15 [diagnostic] lane task error: lane=session:agent:main:telegram:direct:<telegram-user> error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released"
20:16:19 [telegram] outbound send ok operation=sendVoice deliveryKind=voice
RAW_BUFFERClick to expand / collapse

OpenClaw Telegram DM stall report - 2026-05-18

Summary

Telegram DM ingress works, but a message appeared lost because the Telegram direct session was queued behind active work during embedded auto-compaction. The gateway later sent a response, but only after compaction/session takeover errors.

Timeline UTC

20:12:53 [telegram] Inbound message <telegram-user> -> <bot> (direct, 6 chars)
20:12:59 [agent/embedded] embedded run auto-compaction start: reason=overflow
20:14:34 [agent/embedded] embedded run auto-compaction complete: reason=overflow compactionCount=1 willRetry=true
20:15:00 [diagnostic] long-running session: sessionKey=agent:main:telegram:direct:<telegram-user> state=processing age=120s queueDepth=1 reason=queued_behind_active_work activeWorkKind=model_call
20:16:15 [agent/embedded] compaction retry aggregate timeout (60000ms): proceeding with pre-compaction state
20:16:15 [diagnostic] lane task error: lane=main error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released"
20:16:15 [diagnostic] lane task error: lane=session:agent:main:telegram:direct:<telegram-user> error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released"
20:16:19 [telegram] outbound send ok operation=sendVoice deliveryKind=voice

Expected developer review

  • Session queue should not make channel messages look silently dropped.
  • Telegram should send an interim queued/failure acknowledgement when the target session is blocked.
  • Embedded compaction/session takeover handling should recover cleanly for channel-originated turns.
  • Setup/config should not leave active placeholder entries like TU_TELEGRAM_ID_AQUI in Telegram allowlists.

GitHub attempt

Tried gh issue create --repo openclaw/openclaw; failed because the configured GitHub token lacks createIssue permission.

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 Telegram DM stalls behind embedded auto-compaction session