Skip to content

Heartbeat polls overwrite session displayName, breaking control UI session selector #42495

@captivationhub

Description

@captivationhub

Summary

Heartbeat polls overwrite the session's displayName to "heartbeat", causing the control UI session dropdown to show generic "heartbeat" labels instead of the richer context labels set by user messages (e.g., "My App — Project: Dashboard").

Steps to Reproduce

  1. Configure an agent with heartbeat enabled (heartbeat.every: "30m")
  2. Open the control UI (webchat dashboard) and send messages — session dropdown shows descriptive labels from the sender metadata label field
  3. Wait for a heartbeat poll to fire
  4. Observe the session dropdown now shows "heartbeat" instead of the previous descriptive label
  5. Every subsequent heartbeat (every 30 min) resets the label back to "heartbeat"

Expected Behavior

Heartbeat polls should NOT overwrite the user-facing displayName on the session. The heartbeat is an internal system mechanism — it shouldn't clobber metadata set by actual user interactions.

Actual Behavior

The heartbeat creates a context with Provider: "heartbeat" and routes through the main session (agent:main:main). The session's displayName gets overwritten to "heartbeat" because that's the provider/source identifier. This happens every heartbeat interval, so the label is effectively always "heartbeat" unless the user sends a message in between.

Suggested Fix

When processing heartbeat polls, skip updating the session's displayName (and potentially deliveryContext.to) — or only update displayName from non-heartbeat message sources. The heartbeat should be transparent to session metadata.

Environment

  • OpenClaw version: 2026.3.8
  • Channel: webchat (control UI)
  • Heartbeat config: agents.defaults.heartbeat.every: "30m"
  • Session scope: per-sender (default)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions