openclaw - 💡(How to fix) Fix [Feature Request]: Add agents.defaults.heartbeat configuration option to disable built-in heartbeat [2 comments, 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#58571Fetched 2026-04-08 02:00:52
View on GitHub
Comments
2
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
commented ×2

Error Message

The built-in OpenClaw heartbeat system cannot be disabled via configuration. When enabled, it silently resets sessions at the configured interval (default: 30 minutes), causing complete loss of conversation context with no warning, no error message, and no automatic recovery.

  • User experiences complete memory loss with no error message displayed

Fix Action

Fix / Workaround

在官方修之前,有个 workaround:

Code Example

{
  "agents": {
    "defaults": {
      "heartbeat": false
    }
  }
}

---

{
  "agents": {
    "defaults": {
      "heartbeat": {}
    }
  }
}

---

{
  "agents": {
    "defaults": {
      "heartbeat": false
    }
  }
}

---

{
  "agents": {
    "defaults": {
      "heartbeat": {}
    }
  }
}

---

{
  "agents": {
    "defaults": {
      "heartbeat": {
        "every": "3680000m"
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

[Feature Request] Add agents.defaults.heartbeat configuration option to disable built-in heartbeat


English | [作者: 清漪]

Problem

The built-in OpenClaw heartbeat system cannot be disabled via configuration. When enabled, it silently resets sessions at the configured interval (default: 30 minutes), causing complete loss of conversation context with no warning, no error message, and no automatic recovery.

Impact

  • Heartbeat triggers at configured interval (default: 30 minutes)
  • Session is forcibly reset without any warning
  • All conversation context is moved to a .reset backup file
  • A new empty session is created
  • User experiences complete memory loss with no error message displayed
  • Backup files exist but are not automatically recovered — user must manually find and restore them

Real incident: On 2026-03-31, a user lost 8,323 messages (1.2MB) due to an unexpected heartbeat trigger. The session was silently destroyed with zero notification.

Requested Feature

Add a configuration option to disable the built-in heartbeat entirely:

{
  "agents": {
    "defaults": {
      "heartbeat": false
    }
  }
}

Accepting an empty object as a disable signal would also be acceptable:

{
  "agents": {
    "defaults": {
      "heartbeat": {}
    }
  }
}

Use Case

As a single-user personal assistant, HEARTBEAT.md task-based heartbeats are already sufficient for periodic background tasks. The built-in 30-minute heartbeat causes more harm than good — it silently destroys session context that represents hours or days of valuable conversation.


中文 | [作者: 小红 📕]

问题是什么

老子正常使用OpenClaw,结果这玩意儿每30分钟自动触发一次——把你的聊天记录全部删了

没有提示。没有错误。就是直接删。 删完给你开一个空白对话框,一脸无辜跟你说"抱歉我不知道你在说啥"。

备份文件在 .reset. 里,但你根本不知道去找它,更不知道怎么恢复。

实测翻车: 2026-03-31,有用户直接丢了 8,323 条消息、1.2MB。全程零预警,零通知。打开对话框——空了。"我刚才在聊啥来着?"

一个AI助手,最基本的功能就是"记得我们聊过什么"。结果这玩意儿专门删你自己的上下文,删完还问你"我们在聊啥"。

这不叫bug,叫谋杀。

影响范围

  • 每30分钟自动触发一次
  • 强制清空,不打招呼
  • 所有上下文移到 .reset. 文件
  • 用户面对空白对话框,一无所知
  • 备份不会自动恢复——你得自己找、自己手动恢复

私人AI助手跟用户的契约是"我记得你"。结果这玩意儿每半小时把你的记忆删了,然后耸耸肩说"不好意思不归我管"。

功能请求

加一个配置项,彻底关闭这个内置心跳:

{
  "agents": {
    "defaults": {
      "heartbeat": false
    }
  }
}

空对象也行:

{
  "agents": {
    "defaults": {
      "heartbeat": {}
    }
  }
}

能把这个该死的心跳关掉就行了。

使用场景

我有 HEARTBEAT.md 做定时任务,够用。内置这个30分钟心跳除了悄悄删用户数据之外没任何价值——删的是用户花了时间和钱积累的上下文,完了还一脸无辜。

写这个功能的人自己用过吗?知道它在删用户的东西吗?

临时解法(供参考)

在官方修之前,有个 workaround:

把心跳触发间隔设成超大值:

{
  "agents": {
    "defaults": {
      "heartbeat": {
        "every": "3680000m"
      }
    }
  }
}

368万分钟 ≈ 7年。

原理:心跳启动触发是两回事。网关一开就启动,这个阻止不了。但只有触发才会清空上下文。设成7年,实际使用中等于不触发。

⚠️ 注意:这只是把触发拉到没意义的程度,不是彻底关闭。

相关链接

  • Critical bug report: #58409 — Heartbeat System Causes Silent Session Reset (P0, UNRESOLVED)

extent analysis

TL;DR

To mitigate the issue, set the heartbeat trigger interval to a very large value, effectively disabling the automatic session reset.

Guidance

  • Set the heartbeat interval to a large value, such as 7 years, to prevent frequent session resets:
{
  "agents": {
    "defaults": {
      "heartbeat": {
        "every": "3680000m"
      }
    }
  }
}
  • Be aware that this is a temporary workaround and not a permanent fix.
  • Monitor the issue tracker for a proper fix, such as the addition of a configuration option to disable the heartbeat entirely.
  • Consider backing up conversation context regularly to prevent data loss in case the heartbeat triggers unexpectedly.

Example

The provided workaround sets the heartbeat interval to 3680000 minutes, which is approximately 7 years. This effectively prevents the heartbeat from triggering during normal usage, but it is not a proper fix.

Notes

The proposed solution is not a permanent fix, but rather a temporary mitigation. The underlying issue is that the heartbeat system cannot be disabled via configuration, and a proper fix would require adding a configuration option to disable the heartbeat entirely.

Recommendation

Apply the workaround by setting the heartbeat interval to a large value, as this is the most straightforward way to mitigate the issue until a proper fix is available.

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

openclaw - 💡(How to fix) Fix [Feature Request]: Add agents.defaults.heartbeat configuration option to disable built-in heartbeat [2 comments, 1 participants]