Skip to content

Heartbeat system events should not hardcode 'relay to user' instruction #25851

@mudphlapp

Description

@mudphlapp

Problem

When a cron job fires a system event (e.g., heartbeat), the gateway wraps the event text with:

A scheduled reminder has been triggered. The reminder content is: ... Please relay this reminder to the user in a helpful and friendly way.

This is hardcoded in \dist/health-*.js\ files.

For agents configured with \heartbeat.target: 'none'\ and internal-only heartbeat rules (e.g., HEARTBEAT.md saying 'never message the user'), this wrapper directly contradicts the agent's instructions, causing the agent to spam the user with internal triage results.

Expected Behavior

The wrapper text should either:

  1. Be configurable per-agent (e.g., a \heartbeat.wrapperPrompt\ config option)
  2. Respect \heartbeat.target: 'none'\ by using an internal-only wrapper like 'Handle this internally per your workspace rules. Do not relay to the user.'
  3. Not add a wrapper at all — just pass the raw system event text and let the agent's own instructions (HEARTBEAT.md) govern behavior

Current Workaround

Manually patching the \dist/health-*.js\ files after every install to replace the relay instruction. This works but is fragile and gets overwritten on updates.

Environment

  • OpenClaw \2026.2.23\
  • Windows 11
  • Node v22.22.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions