Bug Description
Isolated cron sessions that specify an explicit model in their payload (e.g., anthropic/claude-sonnet-4-6) are blocked by the LiveSessionModelSwitch guard when the parent agent's default model differs (e.g., anthropic/claude-opus-4-6).
Expected Behavior
Isolated cron sessions should respect the model field in the cron payload without triggering LiveSessionModelSwitch. The isolation boundary should allow model selection independent of the parent agent's default.
Actual Behavior
- Cron job triggers with
payload.model: 'anthropic/claude-sonnet-4-6'
- Parent agent (
main) has model.primary: 'anthropic/claude-opus-4-6'
- OC detects model mismatch and throws
LiveSessionModelSwitchError
- Sonnet is rejected, Gemini fallback is also rejected (same error)
- Only Opus (matching agent default) succeeds via 3rd fallback attempt
Impact
- All cron jobs run on Opus instead of Sonnet — significant cost increase (~$60/month for typical setup)
- Fallback chain adds latency — 3 attempts before success
- Concurrent batch triggers timeout — fallback overhead × concurrent jobs = 600s timeout hit
- Workaround required — must create a separate agent with Sonnet as primary and assign all crons to it
Log Evidence
live session model switch detected before attempt for <run-id>: anthropic/claude-sonnet-4-6 -> anthropic/claude-opus-4-6
LiveSessionModelSwitchError: Live session model switch requested: anthropic/claude-sonnet-4-6
Fallback decision pattern:
{
"event": "model_fallback_decision",
"decision": "candidate_failed",
"requestedModel": "claude-sonnet-4-6",
"candidateModel": "claude-sonnet-4-6",
"errorPreview": "Live session model switch requested: anthropic/claude-opus-4-6"
}
Reproduction
- Configure agent with
model.primary: 'anthropic/claude-opus-4-6'
- Create cron job with
sessionTarget: 'isolated' and payload.model: 'anthropic/claude-sonnet-4-6'
- Trigger the cron job
- Observe LiveSessionModelSwitchError in logs
Environment
- OpenClaw 2026.3.28 (f9b1079)
- Windows 11 / Node 24.13.0
- Agent:
main with Opus 4.6 primary, Sonnet 4.6 + Gemini 3.1 Pro as fallbacks
Suggested Fix
For sessionTarget: 'isolated' sessions, the payload.model should be treated as the session's native model rather than triggering LiveSessionModelSwitch detection against the parent agent's default.
Bug Description
Isolated cron sessions that specify an explicit
modelin their payload (e.g.,anthropic/claude-sonnet-4-6) are blocked by the LiveSessionModelSwitch guard when the parent agent's default model differs (e.g.,anthropic/claude-opus-4-6).Expected Behavior
Isolated cron sessions should respect the
modelfield in the cron payload without triggering LiveSessionModelSwitch. The isolation boundary should allow model selection independent of the parent agent's default.Actual Behavior
payload.model: 'anthropic/claude-sonnet-4-6'main) hasmodel.primary: 'anthropic/claude-opus-4-6'LiveSessionModelSwitchErrorImpact
Log Evidence
Fallback decision pattern:
{ "event": "model_fallback_decision", "decision": "candidate_failed", "requestedModel": "claude-sonnet-4-6", "candidateModel": "claude-sonnet-4-6", "errorPreview": "Live session model switch requested: anthropic/claude-opus-4-6" }Reproduction
model.primary: 'anthropic/claude-opus-4-6'sessionTarget: 'isolated'andpayload.model: 'anthropic/claude-sonnet-4-6'Environment
mainwith Opus 4.6 primary, Sonnet 4.6 + Gemini 3.1 Pro as fallbacksSuggested Fix
For
sessionTarget: 'isolated'sessions, thepayload.modelshould be treated as the session's native model rather than triggering LiveSessionModelSwitch detection against the parent agent's default.