-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Description
Bug Report
PR #16286 fixed NO_REPLY token suppression in the webchat streaming path but missed the chat history endpoint.
Issue
When webchat loads message history via the chat.history API endpoint (server-methods/chat.ts:565), it returns raw session messages containing NO_REPLY text. The sanitizeChatHistoryMessages() function only handles truncation/metadata stripping — it does NOT filter out assistant messages containing NO_REPLY text.
Result
When users refresh webchat or open a new connection, historical NO_REPLY messages appear in the chat interface.
Root Cause
- ✅ Streaming path: Fixed in PR fix(webchat): filter NO_REPLY token from streaming and final replies (#16269) #16286 (commit baa3bf2) -
emitChatDeltaandemitChatFinalnow suppress NO_REPLY - ❌ History path: Still unfixed -
chat.historyendpoint needs same filtering
Fix Location
src/gateway/server-methods/chat.ts in the sanitizeChatHistoryMessages function or chat.history handler — filter out assistant messages where text content matches isSilentReplyText().
Relates To
PR #16286 - this is the missing piece of that fix
Original issue #16269
Environment
OpenClaw v2026.2.17