openclaw - ๐Ÿ’ก(How to fix) Fix Telegram message delete hangs indefinitely when API call fails (no per-request timeout) [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โ€ฆ

openclaw message delete --channel telegram hangs forever after plugin load. The underlying Telegram Bot API HTTP request never resolves or rejects, and the CLI gives no error and never exits.

Error Message

openclaw message delete --channel telegram hangs forever after plugin load. The underlying Telegram Bot API HTTP request never resolves or rejects, and the CLI gives no error and never exits. Most reliable trigger: try to delete a user-sent message in a private DM with the bot โ€” Telegram Bot API forbids this, but instead of getting the expected error, the CLI hangs. () => reject(new Error( This converts an indefinite hang into a real timeout error that the retry runner can surface to the CLI user.

Root Cause

retryAsync in dist/retry-bxEL5fFj.js wraps fn() with retry semantics but has no per-call timeout:

```javascript for (let attempt = 1; attempt <= maxAttempts; attempt += 1) try { return await fn(); // hangs if HTTP call hangs } catch (err) { ... } ```

`CHANNEL_API_RETRY_DEFAULTS` has `attempts: 3` and `maxDelayMs: 30000`, but those govern delay between attempts, not the duration of a single attempt. If grammy's `bot.api.deleteMessage` never returns, the runner is stuck.

Fix Action

Fixed

Code Example

openclaw message delete --channel telegram \
    --target <chat-id> \
    --message-id <id-of-user-sent-message-in-private-DM>
RAW_BUFFERClick to expand / collapse

Summary

openclaw message delete --channel telegram hangs forever after plugin load. The underlying Telegram Bot API HTTP request never resolves or rejects, and the CLI gives no error and never exits.

Reproduce

openclaw message delete --channel telegram \
    --target <chat-id> \
    --message-id <id-of-user-sent-message-in-private-DM>

Most reliable trigger: try to delete a user-sent message in a private DM with the bot โ€” Telegram Bot API forbids this, but instead of getting the expected error, the CLI hangs.

Diagnostic findings

Instrumented deleteMessageTelegram in dist/extensions/telegram/send-t4GTTdHF.js. All preceding steps emit diagnostics and complete:

  • deleteMessageTelegram entry
  • resolveTelegramApiContext ok
  • before/after resolveAndPersistChatId
  • normalized messageId
  • about to call deleteMessage api
  • inside request closure -> api.deleteMessage

Then nothing. api.deleteMessage() never resolves or rejects. The promise hangs indefinitely.

Root cause

retryAsync in dist/retry-bxEL5fFj.js wraps fn() with retry semantics but has no per-call timeout:

```javascript for (let attempt = 1; attempt <= maxAttempts; attempt += 1) try { return await fn(); // hangs if HTTP call hangs } catch (err) { ... } ```

`CHANNEL_API_RETRY_DEFAULTS` has `attempts: 3` and `maxDelayMs: 30000`, but those govern delay between attempts, not the duration of a single attempt. If grammy's `bot.api.deleteMessage` never returns, the runner is stuck.

Proposed fix

Add a per-call timeout, either in `retryAsync` or in `createTelegramRequestWithDiag`:

```javascript const TIMEOUT_MS = 30000; return await Promise.race([ fn(), new Promise((_, reject) => setTimeout( () => reject(new Error( `Telegram request timeout after ${TIMEOUT_MS}ms (label=${label})` )), TIMEOUT_MS )) ]); ```

This converts an indefinite hang into a real timeout error that the retry runner can surface to the CLI user.

Likely applies to other channel adapters too โ€” generic improvement.

Environment

  • OpenClaw 2026.4.29
  • macOS 14 (arm64)
  • Node v22.22.0

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 message delete hangs indefinitely when API call fails (no per-request timeout) [2 pull requests]