openclaw - 💡(How to fix) Fix delivery-recovery on restart sends raw session context blob instead of original message [1 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#72184Fetched 2026-04-27 05:33:42
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
1
Author
Timeline (top)
closed ×1commented ×1

Fix Action

Fix / Workaround

  1. Have an in-progress agent turn with config.patch triggered restart
  2. Gateway restarts, finds 1 pending delivery in recovery queue
  3. Delivery is sent to Telegram — but the message body contains raw session bootstrap context (e.g. source code from workspace files) instead of the intended agent reply
  • OpenClaw: 2026.4.22 / Channel: telegram / Trigger: config.patch → gateway restart

Code Example

[delivery-recovery] Found 1 pending delivery entries — starting recovery
[delivery-recovery] Recovered delivery 1284acaa-3327-4b99-9c77-561fa47917ae on telegram
RAW_BUFFERClick to expand / collapse

Bug

After a gateway restart, delivery recovery sends a garbled message to the channel containing raw session context (workspace file content, source code snippets) instead of the original pending delivery text.

Steps to reproduce

  1. Have an in-progress agent turn with config.patch triggered restart
  2. Gateway restarts, finds 1 pending delivery in recovery queue
  3. Delivery is sent to Telegram — but the message body contains raw session bootstrap context (e.g. source code from workspace files) instead of the intended agent reply

Log evidence

[delivery-recovery] Found 1 pending delivery entries — starting recovery
[delivery-recovery] Recovered delivery 1284acaa-3327-4b99-9c77-561fa47917ae on telegram

The delivered message contained a raw excerpt from executor.ts (BALANCE_DRIFT_THRESHOLD logic) — workspace source code that had no business being in a user-facing message.

Expected behavior

Delivery recovery should either deliver the actual pending agent reply text, or drop the recovery if the content cannot be safely reconstructed.

Environment

  • OpenClaw: 2026.4.22 / Channel: telegram / Trigger: config.patch → gateway restart

extent analysis

TL;DR

The issue can be mitigated by ensuring that the delivery recovery process correctly reconstructs the original pending delivery text instead of sending raw session context.

Guidance

  • Verify that the config.patch triggered restart is properly handling the pending delivery queue, potentially by checking the queue's persistence and data integrity.
  • Investigate the delivery recovery logic to determine why it's sending raw session context instead of the intended agent reply text, focusing on how the executor.ts source code is being incorporated into the message.
  • Check the logging around delivery recovery to see if there are any indicators of data corruption or misinterpretation of the pending delivery content.
  • Consider adding safeguards to the delivery recovery process to detect and handle cases where the original pending delivery text cannot be safely reconstructed, such as dropping the recovery or sending an error message.

Example

No code snippet can be provided without more context on the specific implementation details of the delivery recovery logic and how it interacts with the session context.

Notes

The exact cause of the issue is unclear without more information on the implementation of the delivery recovery process and how it handles pending deliveries during a gateway restart. The provided log evidence suggests that the recovery process is aware of the pending delivery but fails to correctly reconstruct its content.

Recommendation

Apply a workaround to the delivery recovery process to ensure it either delivers the correct pending agent reply text or drops the recovery if the content cannot be safely reconstructed, as the root cause of the issue is not immediately clear and may require further investigation.

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

Delivery recovery should either deliver the actual pending agent reply text, or drop the recovery if the content cannot be safely reconstructed.

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 delivery-recovery on restart sends raw session context blob instead of original message [1 comments, 2 participants]