← Back to library

Heartbeat directPolicy 迁移:从 DM 行为波动到可控投递策略

问题/场景:v2026.2.24 与 v2026.2.25 对 heartbeat 直投 DM 的默认行为有变化,容易造成提醒误发或漏发。前置条件:已升级到 v2026.2.25,且可编辑 gateway 配置。实施步骤:1) 盘点所有 heartbeat 任务;2) 显式设置 agents.defaults.heartbeat.directPolicy;3) 对关键 agent 做 per-agent 覆盖;4) 回归测试 DM/频道投递;5) 记录策略并固化到运维手册。关键命令/配置:`openclaw gateway status`、`openclaw status --deep`、`openclaw help` + `agents.defaults.heartbeat.directPolicy: "allow|block"`。验证方法:同一提醒在目标渠道行为稳定且可预期。风险与边界:多账号多渠道下路由差异较大,需逐渠道验收。来源归因:GitHub release notes v2026.2.25。

GITHUBDiscovered 2026-02-28Author @openclaw
Prerequisites
  • OpenClaw is upgraded to v2026.2.25 or newer.
  • Operator can edit gateway config and run regression checks.
Steps
  1. Inventory all heartbeat jobs that currently rely on direct/DM delivery.
  2. Set `agents.defaults.heartbeat.directPolicy` explicitly to `allow` or `block`.
  3. Override policy for sensitive agents via `agents.list[].heartbeat.directPolicy` when needed.
  4. Run end-to-end checks on DM + channel targets and compare expected routing behavior.
  5. Document final policy and add a post-upgrade checklist item to avoid future drift.
Commands
openclaw gateway status
openclaw status --deep
openclaw help
Verify

Heartbeat reminders land only on intended targets for at least one full schedule cycle.

Caveats
  • If channel account bindings are stale, routing checks may show false negatives(需验证).
  • Do not rely on defaults across versions; always pin policy in config.
Source attribution

This tip is aggregated from community/public sources and preserved with attribution.

Open original source ↗
Visit original post