Version: OpenClaw 2026.3.28 (f9b1079)
OS: macOS 15.6.1 (arm64), Node 25.8.1
Problem
agents.defaults.heartbeat.model is ignored. Heartbeat always runs on the global default model regardless of the heartbeat-specific model setting.
Config
{
"agents": {
"defaults": {
"model": { "primary": "anthropic/claude-opus-4-6", "fallbacks": ["openai-codex/gpt-5.4", "ollama/qwen3.5:122b"] },
"heartbeat": {
"every": "30m",
"model": "anthropic/claude-sonnet-4-6",
"isolatedSession": true,
"activeHours": { "start": "07:00", "end": "23:00", "timezone": "America/Chicago" },
"target": "last"
}
}
}
}
Expected
Heartbeat runs on claude-sonnet-4-6 (or whichever model is set in heartbeat.model).
Actual
Heartbeat always runs on claude-opus-4-6 (the global default). Sessions.json shows:
fallbackNoticeSelectedModel: anthropic/claude-sonnet-4-6
fallbackNoticeActiveModel: anthropic/claude-opus-4-6
Gateway logs show:
live session model switch detected before attempt: anthropic/claude-sonnet-4-6 -> anthropic/claude-opus-4-6
The heartbeat model is selected correctly, but then a LiveSessionModelSwitch overrides it to the global default before the API call is made.
Reproduction
- Set
agents.defaults.model.primary to anthropic/claude-opus-4-6
- Set
agents.defaults.heartbeat.model to any different model (tested with anthropic/claude-sonnet-4-6 and ollama/qwen3.5:27b)
- Enable
agents.defaults.heartbeat.isolatedSession: true
- Wait for heartbeat to fire
- Check
sessions.json — heartbeat session will show the global default model, not the heartbeat model
What I have tried (all failed)
- Setting
heartbeat.model to Sonnet — falls back to Opus
- Setting
heartbeat.model to ollama/qwen3.5:27b — falls back to Opus
- Enabling
isolatedSession: true — no effect
- Deleting heartbeat session entries AND transcript files from sessions.json — fresh session still falls back
- Multiple gateway restarts — no effect
- Clearing all model/provider/authProfile override fields from heartbeat session entries — overrides reappear on next run
Analysis
The fallbackNoticeSelectedModel field confirms that OpenClaw correctly reads the heartbeat.model config and initially selects the right model. However, something in the session initialization or model resolution pipeline detects a model mismatch with the existing session context and triggers a LiveSessionModelSwitch, which forces a fallback to the global default.
This happens even with isolatedSession: true — fresh sessions still exhibit the behavior, suggesting the switch detection may be comparing against the agent-level default rather than the heartbeat-specific model config.
The heartbeat model override appears to be non-functional in practice — the global default always wins.
Version: OpenClaw 2026.3.28 (f9b1079)
OS: macOS 15.6.1 (arm64), Node 25.8.1
Problem
agents.defaults.heartbeat.modelis ignored. Heartbeat always runs on the global default model regardless of the heartbeat-specific model setting.Config
{ "agents": { "defaults": { "model": { "primary": "anthropic/claude-opus-4-6", "fallbacks": ["openai-codex/gpt-5.4", "ollama/qwen3.5:122b"] }, "heartbeat": { "every": "30m", "model": "anthropic/claude-sonnet-4-6", "isolatedSession": true, "activeHours": { "start": "07:00", "end": "23:00", "timezone": "America/Chicago" }, "target": "last" } } } }Expected
Heartbeat runs on
claude-sonnet-4-6(or whichever model is set inheartbeat.model).Actual
Heartbeat always runs on
claude-opus-4-6(the global default). Sessions.json shows:Gateway logs show:
The heartbeat model is selected correctly, but then a
LiveSessionModelSwitchoverrides it to the global default before the API call is made.Reproduction
agents.defaults.model.primarytoanthropic/claude-opus-4-6agents.defaults.heartbeat.modelto any different model (tested withanthropic/claude-sonnet-4-6andollama/qwen3.5:27b)agents.defaults.heartbeat.isolatedSession: truesessions.json— heartbeat session will show the global default model, not the heartbeat modelWhat I have tried (all failed)
heartbeat.modelto Sonnet — falls back to Opusheartbeat.modeltoollama/qwen3.5:27b— falls back to OpusisolatedSession: true— no effectAnalysis
The
fallbackNoticeSelectedModelfield confirms that OpenClaw correctly reads theheartbeat.modelconfig and initially selects the right model. However, something in the session initialization or model resolution pipeline detects a model mismatch with the existing session context and triggers aLiveSessionModelSwitch, which forces a fallback to the global default.This happens even with
isolatedSession: true— fresh sessions still exhibit the behavior, suggesting the switch detection may be comparing against the agent-level default rather than the heartbeat-specific model config.The heartbeat model override appears to be non-functional in practice — the global default always wins.