openclaw - 💡(How to fix) Fix cron announce delivery triggers EmbeddedAttemptSessionTakeoverError when user is actively chatting [2 pull requests]

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…

Error Message

  1. LLM returns -> tries to resume -> detects file changed -> takeover error

Root Cause

  1. User sends a Telegram message -> session file locked for processing
  2. LLM call is made -> embedded prompt lock temporarily released
  3. Cron job completes -> announce delivery writes to the same Telegram session (delivery.to = same user ID)
  4. Session file changes while the original LLM call is still in flight
  5. LLM returns -> tries to resume -> detects file changed -> takeover error

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Problem

When a cron job (sessionTarget="isolated") finishes and its announce delivery sends the result to the same Telegram user, it triggers:

EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released

Root cause

  1. User sends a Telegram message -> session file locked for processing
  2. LLM call is made -> embedded prompt lock temporarily released
  3. Cron job completes -> announce delivery writes to the same Telegram session (delivery.to = same user ID)
  4. Session file changes while the original LLM call is still in flight
  5. LLM returns -> tries to resume -> detects file changed -> takeover error

Relevant config

Cron job delivery: { "sessionTarget": "isolated", "delivery": { "mode": "announce", "channel": "telegram", "to": "8790460537" } }

Expected behavior

Cron announce delivery should not modify the active user session file, or should use a separate write path that doesn't conflict with the embedded agent's prompt lock.

Environment

  • OpenClaw 2026.5.18
  • Telegram channel
  • Isolated cron jobs with announce delivery

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…

FAQ

Expected behavior

Cron announce delivery should not modify the active user session file, or should use a separate write path that doesn't conflict with the embedded agent's prompt lock.

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 cron announce delivery triggers EmbeddedAttemptSessionTakeoverError when user is actively chatting [2 pull requests]