openclaw - ✅(Solved) Fix [Bug]: echoTranscript works in Telegram forum group but not in direct chat (DM) [1 pull requests, 2 comments, 3 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#75084Fetched 2026-05-01 05:38:20
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
2
Author
Timeline (top)
cross-referenced ×3commented ×2closed ×1labeled ×1

The echoTranscript feature delivers the transcript echo correctly in Telegram forum supergroups, but fails to deliver it in Telegram direct chats (DMs). Transcription itself works in both contexts — only the echo message delivery is affected.

Root Cause

The echoTranscript feature delivers the transcript echo correctly in Telegram forum supergroups, but fails to deliver it in Telegram direct chats (DMs). Transcription itself works in both contexts — only the echo message delivery is affected.

Fix Action

Fixed

PR fix notes

PR #73866: fix(media): send echoTranscript for preflight-transcribed audio

Description (problem / solution / changelog)

Summary

Fixes #73615 — tools.media.audio.echoTranscript regression where the transcript echo (📝 "{transcript}") is no longer sent to Telegram after upgrading to v2026.4.25+.

Root Cause

Commit 8bead989da (v2026.4.25) moved Telegram audio transcription into a preflight step that runs before the media-understanding pipeline. The preflight path:

  1. Transcribes audio via transcribeFirstAudio
  2. Sets MediaTranscribedIndexes on the context (marks attachment as alreadyTranscribed)
  3. Formats the transcript into the message body

But applyMediaUnderstanding then skips already-transcribed audio, produces no audio.transcription outputs, and therefore never enters the sendTranscriptEcho code path (which only fires when audioOutputs.length > 0).

Fix

Two-part change:

  1. Telegram context chain (bot-message-context.body.tsbot-message-context.tsbot-message-context.session.ts): Pass the preflightTranscript through the context chain and set ctx.Transcript when it exists, so the transcript is available to the media-understanding pipeline.

  2. Media understanding pipeline (apply.ts): After the main outputs processing block, detect the preflight case — ctx.Transcript is set but no audio outputs were produced — and call sendTranscriptEcho with the pre-existing transcript.

This approach:

  • Preserves the preflight architecture (audio transcribed once, no double-processing)
  • Reuses the existing sendTranscriptEcho function and format config
  • Works for any channel that sets ctx.Transcript before applyMediaUnderstanding runs

Testing

  • Regression test added in apply.test.ts: verifies sendTranscriptEcho fires for preflight-transcribed audio when echoTranscript: true
  • All existing tests pass: 46/46 in apply.test.ts, 103 files / 1475 tests in Telegram extension, full pnpm check + pnpm check:test-types clean

Files Changed

FileChange
extensions/telegram/src/bot-message-context.body.tsReturn preflightTranscript from body resolver
extensions/telegram/src/bot-message-context.tsPass preflightTranscript to session builder
extensions/telegram/src/bot-message-context.session.tsSet ctx.Transcript when preflightTranscript exists
src/media-understanding/apply.tsEcho preflight transcripts when no new audio outputs
src/media-understanding/apply.test.tsRegression test for preflight echo

Changed files

  • extensions/telegram/src/bot-message-context.body.ts (modified, +2/-0)
  • extensions/telegram/src/bot-message-context.session.ts (modified, +3/-0)
  • extensions/telegram/src/bot-message-context.ts (modified, +3/-0)
  • src/media-understanding/apply.test.ts (modified, +47/-0)
  • src/media-understanding/apply.ts (modified, +19/-0)

Code Example

{
  "tools": {
    "media": {
      "audio": {
        "enabled": true,
        "maxBytes": 20971520,
        "models": [
          { "provider": "openai", "model": "gpt-4o-mini-transcribe" }
        ],
        "echoTranscript": true,
        "echoFormat": "📝 \"{transcript}\""
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

Summary

The echoTranscript feature delivers the transcript echo correctly in Telegram forum supergroups, but fails to deliver it in Telegram direct chats (DMs). Transcription itself works in both contexts — only the echo message delivery is affected.

Environment

  • OpenClaw version: v2026.4.27 (stable)
  • Channel: Telegram (both forum supergroup and direct chat)
  • STT provider: OpenAI (gpt-4o-mini-transcribe)
  • Config: tools.media.audio.echoTranscript: true

Behavior

ContextTranscriptionechoTranscript echo
Telegram forum group (super group with topics)✅ Works✅ Works (instant)
Telegram direct chat (DM)✅ Works❌ Not delivered

Configuration (relevant section)

{
  "tools": {
    "media": {
      "audio": {
        "enabled": true,
        "maxBytes": 20971520,
        "models": [
          { "provider": "openai", "model": "gpt-4o-mini-transcribe" }
        ],
        "echoTranscript": true,
        "echoFormat": "📝 \"{transcript}\""
      }
    }
  }
}

Note: No plugins.allow list configured. Only plugins.deny: ["bonjour"].

Steps to reproduce

  1. Configure tools.media.audio.echoTranscript: true with a working STT provider
  2. Send a voice message in a Telegram forum group → echo is delivered ✅
  3. Send a voice message in a Telegram direct chat → no echo delivered ❌
  4. In both cases, the agent receives the transcript text correctly

Expected behavior

The transcript echo should be delivered to the originating chat in both group and DM contexts.

Actual behavior

  • Group: echo delivered instantly before agent reply
  • DM: no echo delivered; transcription works but echo message is missing

Additional observations

  • openclaw doctor --fix did not resolve the issue
  • No relevant logs visible for echo delivery in DM context
  • Agent replies are delivered normally in DM — only the system-generated echo is affected

Related issues

  • #53364 — System messages (echoTranscript) not delivered in forum topics (forum-specific routing bug)
  • #62205 — STT regression v2026.4.5 (original echoTranscript regression, issue is locked)
  • #65443 — TTS voice replies not delivered in Telegram DM (similar DM delivery routing issue)
  • #66459 — Transcript contains reply but no outbound send (similar DM delivery failure)

Hypothesis

The echo message is generated but fails to route to the DM chat. This appears to be a delivery routing issue for system-generated messages in Telegram direct chats, distinct from the forum-topic routing bug in #53364.

Willing to provide additional logs or run further diagnostics.

extent analysis

TL;DR

The issue is likely due to a delivery routing problem for system-generated messages in Telegram direct chats, and a workaround may involve configuring a specific routing rule for DMs.

Guidance

  • Review the routing configuration for system-generated messages in Telegram direct chats to ensure that echo messages are properly routed to the originating chat.
  • Check the plugins.deny list to ensure that it is not interfering with the delivery of system-generated messages in DMs, despite bonjour being the only denied plugin.
  • Investigate the similarities with related issues #65443 and #66459, which also involve delivery failures in Telegram DMs, to see if a common solution can be applied.
  • Consider running additional diagnostics or providing more logs to further troubleshoot the issue, as the openclaw doctor --fix command did not resolve the problem.

Notes

The issue seems to be specific to Telegram direct chats and system-generated messages, and may require a targeted fix or configuration change to resolve.

Recommendation

Apply a workaround by configuring a specific routing rule for DMs, as the issue appears to be related to delivery routing rather than a bug in the echoTranscript feature itself. This approach may help mitigate the problem until a more permanent fix can be implemented.

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

The transcript echo should be delivered to the originating chat in both group and DM contexts.

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]: echoTranscript works in Telegram forum group but not in direct chat (DM) [1 pull requests, 2 comments, 3 participants]