-
-
Notifications
You must be signed in to change notification settings - Fork 68.8k
TUI renders inbound metadata block in user messages #22276
Copy link
Copy link
Closed
Description
Bug
The TUI's UserMessageComponent renders the full message text including the Conversation info (untrusted metadata): JSON block that is prepended by inbound-meta.ts. This metadata is intended for the model only and should not be visible to the user.
Steps to Reproduce
- Open the TUI (
openclaw tui) - Send any message
- Observe the rendered user message includes the metadata block:
Conversation info (untrusted metadata):
\`\`\`json
{"message_id": "...", "sender_id": "...", "sender": "..."}
\`\`\`
Expected Behavior
The metadata block should be stripped before rendering in the TUI. The user should only see their own message text.
Root Cause
src/tui/components/user-message.ts renders raw message text without stripping the metadata injected by src/auto-reply/reply/inbound-meta.ts.
Suggested Fix
Strip text matching the Conversation info (untrusted metadata): pattern (and the surrounding code fence) before passing to UserMessageComponent. Could be done in:
- The TUI event handler that creates
UserMessageComponent - Or a shared utility that strips known metadata patterns
Environment
- OpenClaw source:
~/dev/openclaw - Channel: webchat (TUI)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.