Skip to content

Bug: commentary-phase assistant text leaks to Telegram as user-visible messages #62409

Description

@danielt69

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions