openclaw - 💡(How to fix) Fix Telegram and TUI stay in separate sessions; outbound cross-surface mirroring does not occur [1 comments, 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#44478Fetched 2026-04-08 00:46:23
View on GitHub
Comments
1
Participants
1
Timeline
2
Reactions
0
Timeline (top)
commented ×1cross-referenced ×1

Messages and replies work on each surface independently, but Telegram and TUI/webchat are not mirrored into a shared conversation. Replies stay on the surface where the message originated instead of appearing on both surfaces / the unified session.

Error Message

  • Telegram message arrives and gets a reply in Telegram
  • TUI message arrives and gets a reply in TUI
  • But:
    • Telegram-originated conversation does not appear in TUI
    • TUI-originated conversation does not appear in Telegram

Root Cause

Impact

Multi-surface use is confusing/broken because:

  • TUI and Telegram both appear alive
  • but they do not stay in sync
  • /reset did not fix it
  • restart did not fix it
RAW_BUFFERClick to expand / collapse

Bug: Telegram and TUI stay in separate sessions; outbound cross-surface mirroring does not occur

Version

  • OpenClaw 2026.3.11 (29dc654)

Environment

  • Linux 6.17.0-14-generic
  • Gateway local and reachable
  • Telegram channel enabled and healthy
  • session.dmScope = "main"

Summary

Messages and replies work on each surface independently, but Telegram and TUI/webchat are not mirrored into a shared conversation. Replies stay on the surface where the message originated instead of appearing on both surfaces / the unified session.

Observed behavior

  • Telegram message arrives and gets a reply in Telegram
  • TUI message arrives and gets a reply in TUI
  • But:
    • Telegram-originated conversation does not appear in TUI
    • TUI-originated conversation does not appear in Telegram

So:

  • same-surface delivery works
  • cross-surface mirroring does not

Expected behavior

With session.dmScope: "main", Telegram DM and TUI/webchat should behave like one shared session, or at minimum outbound transcript mirroring should keep both surfaces in sync.

Repro steps

  1. Start OpenClaw with Telegram enabled and TUI/webchat connected.
  2. Confirm config includes session.dmScope: "main".
  3. Send a message from Telegram.
  4. Observe assistant reply appears in Telegram.
  5. Check TUI/webchat: the message/reply does not appear there.
  6. Send a message from TUI/webchat.
  7. Observe assistant reply appears in TUI/webchat.
  8. Check Telegram: the message/reply does not appear there.

Actual session keys created

From ~/.openclaw/agents/main/sessions/sessions.json:

  • agent:main:main
  • agent:main:telegram:direct:8452561355
  • agent:main:telegram:slash:8452561355

This suggests Telegram direct chat and TUI are being persisted as separate sessions rather than unified.

Additional suspicious detail

Inside agent:main:main, metadata shows:

  • lastChannel: "webchat"
  • but origin.from / origin.to are telegram:8452561355

That looks like session metadata/routing may be getting crossed.

Relevant status/log evidence

  • openclaw status showed Gateway reachable, Telegram ON / OK, and separate sessions for main / telegram direct / telegram slash.
  • Logs included:
    • telegram sendMessage ok chat=8452561355 message=668

So this does not look like Telegram delivery failure. It looks like session routing / outbound mirroring failure.

Notes

The bundled docs include docs/refactor/outbound-session-mirroring.md, which seems directly related.

Impact

Multi-surface use is confusing/broken because:

  • TUI and Telegram both appear alive
  • but they do not stay in sync
  • /reset did not fix it
  • restart did not fix it

Question for maintainers

Is this:

  1. a regression in outbound session mirroring,
  2. expected behavior despite session.dmScope: "main", or
  3. a config gap required to unify Telegram DM and TUI/webchat into one session?

extent analysis

Fix Plan

To fix the issue of Telegram and TUI/webchat not mirroring into a shared conversation, we need to modify the session routing logic.

Here are the steps:

  • Update the session.dmScope configuration to include both Telegram and TUI/webchat in the same session scope.
  • Modify the outbound-session-mirroring.md logic to handle cross-surface mirroring for Telegram and TUI/webchat.

Example code snippet:

# Update session.dmScope configuration
session_dm_scope = "main"
session_config = {
    "dmScope": session_dm_scope,
    "surfaces": ["telegram", "tui/webchat"]
}

# Modify outbound-session-mirroring logic
def mirror_outbound_message(message, surface):
    if surface == "telegram":
        # Mirror message to TUI/webchat
        mirror_to_tui_webchat(message)
    elif surface == "tui/webchat":
        # Mirror message to Telegram
        mirror_to_telegram(message)

def mirror_to_tui_webchat(message):
    # Implement logic to mirror message to TUI/webchat
    pass

def mirror_to_telegram(message):
    # Implement logic to mirror message to Telegram
    pass

Verification

To verify that the fix worked, follow these steps:

  • Restart OpenClaw with the updated configuration.
  • Send a message from Telegram and verify that it appears in TUI/webchat.
  • Send a message from TUI/webchat and verify that it appears in Telegram.

Extra Tips

  • Make sure to update the docs/refactor/outbound-session-mirroring.md documentation to reflect the changes made to the outbound session mirroring logic.
  • Test the fix thoroughly to ensure that it works as expected and does not introduce any new issues.

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

With session.dmScope: "main", Telegram DM and TUI/webchat should behave like one shared session, or at minimum outbound transcript mirroring should keep both surfaces in sync.

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 and TUI stay in separate sessions; outbound cross-surface mirroring does not occur [1 comments, 1 participants]