Skip to content

[Bug]: Gateway Chat UI displays system-injected messages (Post-Compaction Audit, Heartbeat) as "You" #26461

@JKbot1

Description

@JKbot1

Summary

Gateway Chat UI displays system-injected messages (Post-Compaction Audit, Heartbeat) as "You"

Steps to reproduce

Title: Gateway Chat UI displays system-injected messages (Post-Compaction Audit, Heartbeat) as "You"

Body:

Summary

After compaction, OpenClaw injects user-role messages into the conversation (e.g., ⚠️ Post-Compaction Audit: The following required startup files were not read... and heartbeat prompts). The Gateway Chat UI renders all user-role messages with the "You" sender label, making these system-injected messages indistinguishable from actual user messages.

This caused a multi-day false alarm where we believed an external attacker was injecting messages into our bot — we rotated all three bot tokens and audited Telegram sessions before realizing these were OpenClaw's own post-compaction prompts.

Steps to reproduce

  1. Run a multi-agent setup with compaction enabled (mode: "safeguard")
  2. Chat until compaction triggers
  3. Open the Gateway Chat UI
  4. Observe the post-compaction audit message displayed with "You" as sender

Expected behavior

System-injected user-role messages (Post-Compaction Audit, Heartbeat prompts) should be visually distinct from actual user messages — e.g., labeled "System" or styled differently (like the existing "COMPACTION" divider).

Actual behavior

All user-role messages show as "You", regardless of origin.

Screenshots

(attached)

OpenClaw version

2026.2.23

Operating system

macOS (Darwin 25.3.0, arm64)

Impact

High — This directly causes false positive security incidents. Users cannot distinguish real messages from system-injected ones, leading to unnecessary token rotations and wasted debugging time.

Expected behavior

System-injected user-role messages should be visually distinct from actual user messages

Actual behavior

All user-role messages show as "You", regardless of origin

Image

OpenClaw version

2026.2.23

Operating system

macOS

Install method

npm global

Logs, screenshots, and evidence

![Image](https://github.com/user-attachments/assets/217b452c-ccb7-4767-83ac-01f220f3cc80)

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions