openclaw - 💡(How to fix) Fix Bug: commentary-phase assistant text leaks to Telegram as user-visible messages [1 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#62409Fetched 2026-04-08 03:04:42
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
subscribed ×1

On OpenClaw 2026.4.5, assistant messages tagged internally as phase: "commentary" are leaking to Telegram as user-visible messages.

This should never happen. Commentary/tool-chatter should remain internal, while only the final user-facing reply should be delivered.

Root Cause

  • We need answer yes there is risk because script deletes any gateway orphan...
  • Need adjust config to use openai api models maybe gpt-4.1/gpt-4o-mini?...
RAW_BUFFERClick to expand / collapse

Summary

On OpenClaw 2026.4.5, assistant messages tagged internally as phase: "commentary" are leaking to Telegram as user-visible messages.

This should never happen. Commentary/tool-chatter should remain internal, while only the final user-facing reply should be delivered.

Impact

High trust / privacy issue.

In a direct Telegram chat, raw internal working notes were surfaced to the user, for example:

  • We need answer yes there is risk because script deletes any gateway orphan...
  • Need adjust config to use openai api models maybe gpt-4.1/gpt-4o-mini?...

These were not final answers. They were internal drafting/commentary text.

Environment

  • OpenClaw: 2026.4.5 (3e72c03)
  • Surface: Telegram direct chat
  • Channel config had channels.telegram.streaming: partial at the time of the observed leaks
  • Provider/model path when the leaks occurred:
    • provider: openai-codex
    • model: gpt-5.4
  • The leaked session artifacts explicitly mark these messages as phase: "commentary"

Evidence from session logs

From the session JSONL, leaked assistant entries are stored like this:

  • timestamp: 2026-04-06T12:50:17.088Z
  • assistant text begins:
    • We need answer yes there is risk because script deletes any gateway orphan, including internal dreaming cron if not in supabase...
  • metadata includes:
    • textSignature.phase = "commentary"

Another example:

  • timestamp: 2026-04-07T08:47:33.195Z
  • assistant text begins:
    • Need adjust config to use openai api models maybe gpt-4.1/gpt-4o-mini?...
  • metadata includes:
    • textSignature.phase = "commentary"

These same commentary texts were observed on Telegram as user-visible assistant messages.

Expected behavior

  • Commentary-phase content should never be sent to the channel surface.
  • Only final user-facing assistant output should be delivered.
  • Tool-call planning / scratch text / commentary should remain internal even when preview streaming is enabled.

Actual behavior

Commentary-phase assistant text was delivered to Telegram as visible chat messages.

Notes / likely area to inspect

This may be specific to the OpenAI Codex / Responses path or to how commentary-phase chunks are handled in Telegram delivery/stream finalization.

The key issue is not merely “reasoning was exposed” — the log evidence shows these are explicitly tagged commentary-phase messages.

Suggested debugging directions

  • Verify Telegram delivery excludes any message/content block tagged phase: commentary
  • Inspect OpenAI Codex / Responses provider path for commentary vs final separation
  • Inspect streaming/finalization path on Telegram for accidental commentary flush or wrong phase selection
  • Add an invariant/assertion that commentary-phase text can never be routed to channel delivery

extent analysis

TL;DR

  • Filter out messages tagged as phase: "commentary" before sending them to Telegram to prevent internal commentary from being exposed to users.

Guidance

  • Verify that the Telegram delivery mechanism is correctly excluding messages with phase: "commentary" by checking the code that handles message routing.
  • Inspect the OpenAI Codex/Responses provider path to ensure it properly separates commentary from final responses.
  • Add a check in the streaming/finalization path on Telegram to prevent accidental commentary flush or wrong phase selection.
  • Consider adding an invariant or assertion to guarantee that commentary-phase text is never sent to channel delivery.

Example

# Pseudo-code example of filtering out commentary-phase messages
def send_message_to_telegram(message):
    if message.get('textSignature', {}).get('phase') == 'commentary':
        # Do not send commentary-phase messages to Telegram
        return
    # Send the message to Telegram
    telegram.send(message)

Notes

  • The issue seems specific to the OpenAI Codex/Responses path or the handling of commentary-phase chunks in Telegram delivery/stream finalization.
  • The provided log evidence shows that the leaked messages are explicitly tagged as phase: "commentary", indicating a potential issue with message filtering or routing.

Recommendation

  • Apply a workaround by filtering out messages tagged as phase: "commentary" before sending them to Telegram, as this will prevent internal commentary from being exposed to users.

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

  • Commentary-phase content should never be sent to the channel surface.
  • Only final user-facing assistant output should be delivered.
  • Tool-call planning / scratch text / commentary should remain internal even when preview streaming is enabled.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING