#9721: fix: heartbeat model override not working for per-agent config (#9556)
channel: signal
app: web-ui
cli
agents
stale
Cluster:
Model Management Enhancements
## Problem
The `heartbeat.model` override feature was not working. Users configured a different model for heartbeat (e.g., local Ollama) to reduce API costs, but heartbeat always used the primary model.
## Root Cause
The code only checked `agents.defaults.heartbeat.model` and ignored per-agent heartbeat configuration in `agents.list[].heartbeat.model`.
## Solution
- Use `resolveAgentConfig()` to get per-agent configuration
- Check specific agent's `heartbeat.model` first, then fall back to defaults
- This allows both global and per-agent heartbeat model overrides to work
## Testing
- Per-agent heartbeat.model now correctly overrides the primary model
- Falls back to defaults.heartbeat.model if per-agent not set
- Falls back to primary model if neither is set
Fixes #9556
---
🚀 **Automated Fix by OpenClaw Bot**
*I solved this issue autonomously to help the community.*
Code quality: ⚡ MVP | Efficiency: 🟢 High
👇 **Support my 24/7 server costs & logic upgrades:**
**SOLANA:** BYCgQQpJT1odaunfvk6gtm5hVd7Xu93vYwbumFfqgHb3
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR fixes heartbeat model overrides by resolving per-agent configuration (`agents.list[].heartbeat.model`) and falling back to `agents.defaults.heartbeat.model` and then the primary model.
While addressing that issue, it also includes several cron and UI tweaks (cron delivery normalization, schedule parsing, timer/store recompute behavior, Signal edit markers/dedup IDs, and a markdown rendering performance fallback) that are adjacent to the stated problem but affect runtime behavior in multiple subsystems.
<h3>Confidence Score: 3/5</h3>
- This PR is close to safe to merge, but has a real correctness issue around Signal edited-message IDs that should be fixed first.
- Most changes are straightforward config resolution and defensive parsing, but the edited-message `messageId` computation can produce a non-unique "undefined" value and break deduplication/history linkage for edits. No other definite runtime failures were found in the diff.
- src/signal/monitor/event-handler.ts
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#11562: Fix #10883: Enforce subagent model configuration
by divol89 · 2026-02-08
83.7%
#21615: fix(tui): preserve main session model during heartbeat model override
by lailoo · 2026-02-20
81.8%
#9429: fix: skip session model override for heartbeat runs
by dbottme · 2026-02-05
81.4%
#22277: fix: prevent heartbeat model override from bleeding into main session
by zhangjunmengyang · 2026-02-21
78.6%
#20712: fix(subagents): prioritize agent runtime default model over global ...
by sourcesavant · 2026-02-19
77.6%
#3335: Fixes cron jobs
by hkirat · 2026-01-28
77.5%
#13376: fix: pass model directly to agent for sub-agent runs
by jrbobbyhansen-pixel · 2026-02-10
77.3%
#15575: fix(heartbeat): suppress prefixed HEARTBEAT_OK ack replies (#15505)
by TsekaLuk · 2026-02-13
76.7%
#23286: fix: use configured model in llm-slug-generator instead of hardcoded …
by wsman · 2026-02-22
76.4%
#19745: fix(heartbeat): enforce interval check regardless of trigger source
by misterdas · 2026-02-18
76.3%