#12837: fix(heartbeat): suppress HEARTBEAT_OK token delivery
stale
Cluster:
HEARTBEAT_OK Suppression Fixes
## Summary
Fixes a heartbeat delivery edge case where model heartbeat ack tokens (`HEARTBEAT_OK`) could be relayed to user channels.
## Changes
- In `runHeartbeatOnce`, when a heartbeat reply normalizes to an `ok-token` skip (`HEARTBEAT_OK` with no deliverable content), the runner now discards it.
- `HEARTBEAT_OK` is no longer relayed to user channels in that path (even when `visibility.showOk` is enabled).
- Updated test coverage in:
- `src/infra/heartbeat-runner.respects-ackmaxchars-heartbeat-acks.test.ts`
## Why this is not a duplicate
- Checked issue timeline and cross-references before starting.
- No open PR was found that fixes #12767 directly.
- #12785 references #12767 as a starter-issues list, not an implementation PR.
## Testing
- Ran locally:
- `pnpm test src/infra/heartbeat-runner.respects-ackmaxchars-heartbeat-acks.test.ts`
- Result: **1 file passed, 9 tests passed**
## Contributing checklist
- [x] Focused PR that addresses a single issue
- [x] AI-assisted: yes
- [x] Model used: `openai-codex/gpt-5.3-codex`
- [x] Testing disclosed (targeted test above)
Closes #12767
Most Similar PRs
#15575: fix(heartbeat): suppress prefixed HEARTBEAT_OK ack replies (#15505)
by TsekaLuk · 2026-02-13
76.9%
#17006: fix(heartbeat): skip delivery when showOk is false
by Limitless2023 · 2026-02-15
74.9%
#16321: Fix #12767: suppress HEARTBEAT_OK leakage in Telegram DM replies
by tdjackey · 2026-02-14
73.7%
#17371: fix(heartbeat): always strip HEARTBEAT_OK token from reply text
by BinHPdev · 2026-02-15
72.6%
#21615: fix(tui): preserve main session model during heartbeat model override
by lailoo · 2026-02-20
71.6%
#22277: fix: prevent heartbeat model override from bleeding into main session
by zhangjunmengyang · 2026-02-21
71.5%
#12786: fix: drop heartbeat runs that arrive while another run is active
by mcaxtr · 2026-02-09
70.3%
#19406: fix(heartbeat): filter error payloads from heartbeat reply selection
by namabile · 2026-02-17
70.2%
#21014: fix(cron): suppress main-session summary for HEARTBEAT_OK responses
by nickjlamb · 2026-02-19
69.6%
#21232: fix(heartbeat): preserve real delivery target in session context
by sleitor · 2026-02-19
69.4%