You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TUI: Telegram messages update session state but do not appear live until session/history reload #41937
In openclaw tui, inbound Telegram messages are written to the correct session, but they often do not appear live in the TUI chat log until a manual reload (/session ..., session switch, or reconnect/history fetch).
This appears to be a TUI live-event subscription/render issue (not routing/session-key mismatch).
Observe: message is processed (assistant can reply / session timestamp updates), but message is not shown live in TUI.
Run /session agent:main:telegram:direct:<peer> (or switch away/back).
Observe: previously missing message now appears.
Diagnostics / observations
Session metadata updates immediately for affected telegram direct sessions.
Behavior reproduced across all three agents, suggesting issue is in TUI event subscription/streaming layer rather than agent/channel routing.
Gateway restart did not resolve the symptom.
Expected
TUI should render inbound Telegram messages live for the currently selected session without manual history/session reload.
Additional note
There was also an occasional Telegram delivery-recovery warning after restart: 400: Bad Request: message to be replied not found
This may be separate, but mentioning for context.
Current main already contains the TUI-side fix for external/non-local chat updates: non-local chat final events trigger a history reload for the active session, with regression coverage for that exact path. The same logic is present in release v2026.4.22.
What I checked:
TUI reloads history for non-local finals:maybeRefreshHistoryForRun() calls loadHistory() for non-local runs, and handleChatEvent() invokes it on state: "final" chat events for the current session. This is the code path that makes externally-originated Telegram-backed session updates appear in the TUI without a manual /session reload. (src/tui/tui-event-handlers.ts:240, 7ac35b4f6900)
Regression test matches the reported symptom: The TUI test suite now has an explicit case asserting that a non-local chat final causes a history refresh, plus concurrent-run coverage so local streaming is not clobbered while external updates land. (src/tui/tui-event-handlers.test.ts:458, 7ac35b4f6900)
Activity
sachser66 commentedon Mar 23, 2026
Still reproducible on OpenClaw 2026.3.22.
Tested again after updating to 2026.3.22, and the Telegram ↔ TUI live sync issue is still present.
Observed behavior:
Workaround still required:
/session agent:main:telegram:direct:<peer>So from my side this issue is not fixed in 2026.3.22.
steipete commentedon Apr 24, 2026
Closing this as implemented after Codex review.
Current
mainalready contains the TUI-side fix for external/non-local chat updates: non-localchatfinal events trigger a history reload for the active session, with regression coverage for that exact path. The same logic is present in releasev2026.4.22.What I checked:
maybeRefreshHistoryForRun()callsloadHistory()for non-local runs, andhandleChatEvent()invokes it onstate: "final"chat events for the current session. This is the code path that makes externally-originated Telegram-backed session updates appear in the TUI without a manual/sessionreload. (src/tui/tui-event-handlers.ts:240, 7ac35b4f6900)src/tui/tui-event-handlers.test.ts:458, 7ac35b4f6900)v2026.4.22tag contains the samesrc/tui/tui-event-handlers.tslogic, so this behavior is not only on currentmainbut also present in the latest released tree. (src/tui/tui-event-handlers.ts:240, 00bd2cf7a376)So I’m closing this as already implemented rather than keeping a duplicate issue open.
Review notes: reviewed against 7ac35b4f6900; fix evidence: release v2026.4.22, commit 00bd2cf7a376.
sachser66 commentedon Apr 25, 2026
Thanks for checking. I re-tested this on OpenClaw 2026.4.23 with a fresh TUI, started on the same Telegram DM session with
--deliver.Result:
--deliverSo from my side, the issue is still reproducible on 2026.4.23.