openclaw - 💡(How to fix) Fix [Bug]: Telegram replies may be duplicated after a gateway restart / auto-compaction retry. [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#78264Fetched 2026-05-07 03:39:01
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
2
Author
Timeline (top)
labeled ×2closed ×1commented ×1

Telegram replies may be duplicated after a gateway restart / auto-compaction retry.

In one Telegram DM session, the user saw repeated assistant messages, but OpenClaw session history showed only one final assistant answer for that turn.

This may be related to gateway restart, auto-compaction retry, or Telegram delivery idempotency.

Root Cause

Telegram replies may be duplicated after a gateway restart / auto-compaction retry.

In one Telegram DM session, the user saw repeated assistant messages, but OpenClaw session history showed only one final assistant answer for that turn.

This may be related to gateway restart, auto-compaction retry, or Telegram delivery idempotency.

Code Example

2026-05-06T08:11:08+07:00 [gateway-tool] gateway tool: restart requested ...
2026-05-06T08:12:42+07:00 [agent/embedded] auto-compaction succeeded ... retrying prompt
2026-05-06T08:12:42+07:00 [agents/post-compaction-guard] post-compaction guard armed ...
2026-05-06T08:12:43+07:00 [telegram] sendMessage ok chat=... message=...
2026-05-06T08:12:52+07:00 [telegram] sendMessage ok chat=... message=...
2026-05-06T08:13:14+07:00 [telegram] sendMessage ok chat=... message=...
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Telegram replies may be duplicated after a gateway restart / auto-compaction retry.

In one Telegram DM session, the user saw repeated assistant messages, but OpenClaw session history showed only one final assistant answer for that turn.

This may be related to gateway restart, auto-compaction retry, or Telegram delivery idempotency.

Steps to reproduce

Not fully reproducible yet, but this happened around the following sequence:

  1. Update OpenClaw config.
  2. Restart gateway.
  3. Gateway sends/handles a continuation message after restart.
  4. Auto-compaction happens and logs retrying prompt.
  5. Telegram receives repeated assistant messages, while session history only shows one final answer.

Expected behavior

Telegram should receive only one message for one final assistant reply, even if gateway restart or auto-compaction retry happens.

Actual behavior

Telegram appeared to receive duplicate/repeated messages.

Session history showed one final assistant answer, but gateway logs showed multiple Telegram sendMessage ok entries close together.

OpenClaw version

OpenClaw 2026.5.4 (325df3e)

Operating system

MacOS 26.3.1

Install method

npm global

Model

openai-codex/gpt-5.5

Provider / routing chain

openai-codex/gpt-5.5

Additional provider/model setup details

No response

Logs, screenshots, and evidence

2026-05-06T08:11:08+07:00 [gateway-tool] gateway tool: restart requested ...
2026-05-06T08:12:42+07:00 [agent/embedded] auto-compaction succeeded ... retrying prompt
2026-05-06T08:12:42+07:00 [agents/post-compaction-guard] post-compaction guard armed ...
2026-05-06T08:12:43+07:00 [telegram] sendMessage ok chat=... message=...
2026-05-06T08:12:52+07:00 [telegram] sendMessage ok chat=... message=...
2026-05-06T08:13:14+07:00 [telegram] sendMessage ok chat=... message=...

Impact and severity

Impact: Low to Medium

This is user-visible but does not appear to cause data loss or security issues.

Duplicate Telegram replies can make the assistant look like it is spamming or malfunctioning, especially after gateway restart / auto-compaction retry. It may reduce trust in chat reliability and create confusion for users.

Severity: Medium if it happens repeatedly; Low if it is limited to rare restart/compaction edge cases.

Additional information

This is a cautious report. I am not sure yet whether the issue is in:

• Telegram delivery retry • gateway continuation handling • post-compaction prompt retry • missing idempotency for final answer delivery

It would be helpful if outbound delivery could be deduplicated by session/response/final-answer id, so a successful channel send is not replayed after retry/restart.

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

Telegram should receive only one message for one final assistant reply, even if gateway restart or auto-compaction retry happens.

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 replies may be duplicated after a gateway restart / auto-compaction retry. [1 comments, 2 participants]