openclaw - ✅(Solved) Fix [Bug]: Channel issues on Telegram and Discord in OpenClaw 2026.4.21 [1 pull requests, 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#70623Fetched 2026-04-24 05:55:30
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×2referenced ×2commented ×1cross-referenced ×1

Bug: Channel issues on Telegram and Discord in OpenClaw 2026.4.21

Error Message

  • In Telegram, the agent reply should be delivered normally without the follow-up error. The agent's reply is sometimes delivered successfully via the message tool workaround, but it is always followed by a user-visible error message: "Agent couldn't generate a response". This error appears after every agent turn, regardless of the content.
  • Consequence: Missed replies, ghost error messages, Discord channel unusable

Root Cause

Bug: Channel issues on Telegram and Discord in OpenClaw 2026.4.21

Fix Action

Fix / Workaround

For Telegram: The agent's reply is sometimes delivered successfully via the message tool workaround, but it is always followed by a user-visible error message: "Agent couldn't generate a response". This error appears after every agent turn, regardless of the content.

PR fix notes

PR #70648: fix(telegram): suppress phantom "couldn't generate" whenever messaging tool sent

Description (problem / solution / changelog)

Summary

Fixes the phantom "Agent couldn't generate a response" error that appeared after every Telegram turn in v2026.4.21, even when the agent's reply was successfully delivered.

Problem

The incomplete-turn handler suppressed the error only when BOTH didSendViaMessagingTool===true AND stopReason==="stop". If the turn ended with stopReason="tool_use", "end_turn", or "max_tokens" — all valid clean endings — the error still fired despite the messaging tool having already delivered the reply.

Solution

Relax the suppression condition: if didSendViaMessagingTool===true, suppress the error regardless of stopReason. The messaging tool delivered the reply — the error is always a false positive in that case.

Tool-error cases (lastToolError) are already handled earlier and remain unaffected.

Testing

  • Existing test coverage for resolveIncompleteTurnPayloadText continues to pass
  • No regression: non-messaging-tool turns still surface errors normally when appropriate

Related

  • Fixes #70623 Bug 1 — Telegram phantom "Agent couldn't generate a response" after every turn
  • Bug 2 (Discord inbound blackout) tracked separately — requires additional investigation

Changed files

  • src/agents/pi-embedded-runner/run/incomplete-turn.ts (modified, +11/-9)

Code Example

See detailed reproduction notes in the main report body. Screenshots available if needed.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Bug: Channel issues on Telegram and Discord in OpenClaw 2026.4.21

Steps to reproduce

For Telegram

  1. Start a Telegram session with the agent.
  2. Have the agent produce any reply (plain text, tool output, or a turn ending in NO_REPLY).
  3. Observe that the user sees Agent couldn't generate a response after the turn, even when the reply itself was delivered.

For Discord

  1. Configure the bot correctly (token valid, bot online, Message Content Intent enabled, correct channel permissions, re-invite completed).
  2. Send a message to the bot in the Discord channel or DM.
  3. Observe that no session is created and the message is never received by the agent.

Expected behavior

  • In Telegram, the agent reply should be delivered normally without the follow-up error.
  • In Discord, messages sent to the bot should be received by OpenClaw and create/process a session normally.

Actual behavior

For Telegram: The agent's reply is sometimes delivered successfully via the message tool workaround, but it is always followed by a user-visible error message: "Agent couldn't generate a response". This error appears after every agent turn, regardless of the content.

For Discord: Despite the bot being online and openclaw doctor reporting the channel as "ok", the agent receives no events or messages from Discord. Messages sent by the user in the channel or DMs are never processed, and no new session is created. It is a complete black hole for inbound messages.

OpenClaw version

2026.4.21

Operating system

Ubuntu 24.04

Install method

docker

Model

google/gemini-2.5-pro

Provider / routing chain

openclaw -> google openclaw -> openai (via openrouter)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

See detailed reproduction notes in the main report body. Screenshots available if needed.

Impact and severity

  • Affected users/systems/channels: Telegram and Discord channels
  • Severity: Major
  • Frequency: Intermittent for Telegram replies, always for Discord inbound
  • Consequence: Missed replies, ghost error messages, Discord channel unusable

Additional information

No response

extent analysis

TL;DR

The issue with OpenClaw 2026.4.21 on Telegram and Discord channels may be resolved by investigating and fixing the channel configuration and message processing logic.

Guidance

  • Verify the channel configuration for both Telegram and Discord to ensure that the bot is properly set up and has the necessary permissions.
  • Investigate the message processing logic to determine why the "Agent couldn't generate a response" error is being displayed after every agent turn on Telegram.
  • Check the OpenClaw logs for any errors or warnings related to Discord message processing to understand why messages are not being received by the agent.
  • Test the message tool workaround on Telegram to see if it can provide any insights into the issue.

Example

No code snippet is provided as the issue does not contain enough technical details to create a specific example.

Notes

The issue seems to be related to the channel configuration and message processing logic, but more information is needed to provide a definitive solution. The openclaw doctor report showing the channel as "ok" suggests that the issue may be with the message processing logic rather than the channel configuration.

Recommendation

Apply workaround: Investigate and fix the channel configuration and message processing logic to resolve the issue, as upgrading to a fixed version is not implied in the given information.

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

  • In Telegram, the agent reply should be delivered normally without the follow-up error.
  • In Discord, messages sent to the bot should be received by OpenClaw and create/process a session normally.

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 - ✅(Solved) Fix [Bug]: Channel issues on Telegram and Discord in OpenClaw 2026.4.21 [1 pull requests, 1 comments, 2 participants]