openclaw - 💡(How to fix) Fix [Feature]: Option to persist Heartbeat output to main session history [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#63177Fetched 2026-04-09 07:57:27
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
1
Author
Participants
Timeline (top)
labeled ×1

Add a configuration option to allow Heartbeat output messages to be saved into the main session history, so the agent can reference them in subsequent conversations.

Root Cause

Add a configuration option to allow Heartbeat output messages to be saved into the main session history, so the agent can reference them in subsequent conversations.

Fix Action

Fix / Workaround

  • Writing heartbeat output to a file (e.g., LATEST_NEWS.md) and having the agent read it — works but feels hacky and adds complexity
  • Storing heartbeat output in the memory system — not all setups have memory configured, and it's an indirect workaround
  • Copy-pasting the heartbeat message back to the agent — functional but defeats the purpose of automation
RAW_BUFFERClick to expand / collapse

Summary

Add a configuration option to allow Heartbeat output messages to be saved into the main session history, so the agent can reference them in subsequent conversations.

Problem to solve

Currently, Heartbeat output is treated as a one-time notification — it gets delivered to the user via the chat channel but is not persisted in the main session history. This creates an awkward experience:

  1. Heartbeat pushes a message to me (e.g., a trending news summary)
  2. I read it in the chat window and want to follow up
  3. I ask the agent in the same conversation for more details about the news
  4. The agent says it cannot see the heartbeat message and has no idea what I'm referring to

This breaks the conversational flow and makes the interaction feel disconnected. The user sees the message in the chat UI, naturally assumes the AI "said" it and can discuss it, but the AI has no memory of it.

Proposed solution

<html> <body> <!--StartFragment--><!-- obsidian --><p>Add a configuration option like:</p> <pre><code class="language-yaml">agents: defaults: heartbeat: persistToHistory: true # default: false (current behavior) </code></pre>
ValueBehavior
false (default)Current behavior — heartbeat output is not saved to session history (saves tokens)
trueHeartbeat output is appended to the main session history, allowing the agent to reference it in future turns
<p>This way, users who want a seamless conversational experience can opt in, while users who prioritize token savings can keep the current behavior.</p><!--EndFragment--> </body> </html>

Alternatives considered

  • Writing heartbeat output to a file (e.g., LATEST_NEWS.md) and having the agent read it — works but feels hacky and adds complexity
  • Storing heartbeat output in the memory system — not all setups have memory configured, and it's an indirect workaround
  • Copy-pasting the heartbeat message back to the agent — functional but defeats the purpose of automation

Impact

None of these are as clean as a native config option.

Evidence/examples

No response

Additional information

  • This is a common pain point for users who use Heartbeat for proactive notifications (news, reminders, status updates) and expect to have follow-up conversations about the pushed content
  • A possible enhancement: allow a maxHeartbeatHistory setting to limit how many heartbeat turns are retained, balancing context size and usability

extent analysis

TL;DR

Add a configuration option persistToHistory to save Heartbeat output messages to the main session history, enabling the agent to reference them in subsequent conversations.

Guidance

  • Consider adding the proposed configuration option persistToHistory to your agent's settings, allowing users to opt-in for a seamless conversational experience.
  • Evaluate the trade-off between token savings and conversational flow, as enabling this option may increase token usage.
  • If implementing this solution, test the agent's behavior with the new configuration option to ensure it meets the desired conversational flow.
  • Review the alternatives considered, such as writing heartbeat output to a file or storing it in the memory system, to determine if they may be viable workarounds in specific scenarios.

Example

agents:
  defaults:
    heartbeat:
      persistToHistory: true

This example demonstrates how to enable the persistToHistory option in your configuration file.

Notes

The proposed solution assumes that the agent's architecture supports appending heartbeat output to the main session history. If this is not the case, alternative solutions may need to be explored.

Recommendation

Apply the workaround by adding the persistToHistory configuration option, as it provides a clean and native solution to the problem, allowing users to opt-in for a seamless conversational experience.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING