openclaw - 💡(How to fix) Fix LiveSessionModelSwitchError: isolated cron sessions inherit parent agent's model override [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#58568Fetched 2026-04-08 02:00:57
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Participants
Timeline (top)
closed ×1commented ×1cross-referenced ×1locked ×1

Error Message

LiveSessionModelSwitchError: Live session model switch requested: anthropic/claude-sonnet-4-6

Fix Action

Workaround

Switching cron job models to the same provider family as the parent agent (e.g., anthropic/claude-haiku-3-5) appears to reduce the frequency of this error, but the underlying issue remains — isolated sessions should not be inheriting parent model state.

Code Example

LiveSessionModelSwitchError: Live session model switch requested: anthropic/claude-sonnet-4-6
RAW_BUFFERClick to expand / collapse

Bug Description

Isolated cron job sessions (sessionTarget: "isolated") are throwing LiveSessionModelSwitchError instead of starting fresh with the model specified in the cron payload.

Expected Behavior

When a cron job has sessionTarget: "isolated" and specifies a model in its payload (e.g., google-gemini-cli/gemini-3.1-flash-lite-preview), the isolated session should start with that model directly — no model switching needed.

Actual Behavior

The isolated session appears to inherit the parent agent's live session model (e.g., anthropic/claude-sonnet-4-6) and then throws:

LiveSessionModelSwitchError: Live session model switch requested: anthropic/claude-sonnet-4-6

This causes the cron job to fail immediately without executing.

Reproduction

  1. Configure an agent with model.primary: anthropic/claude-sonnet-4-6
  2. Create a cron job with:
    • sessionTarget: "isolated"
    • payload.model: "google-gemini-cli/gemini-3.1-flash-lite-preview"
  3. Run the cron job
  4. Observe LiveSessionModelSwitchError in the output

Environment

  • OpenClaw version: 2026.3.28
  • OS: Ubuntu 22.04 (Proxmox VM)
  • Multiple agents affected (main, home-it, health)
  • All cron jobs using gemini-3.1-flash-lite-preview while parent agents use claude-sonnet-4-6

Workaround

Switching cron job models to the same provider family as the parent agent (e.g., anthropic/claude-haiku-3-5) appears to reduce the frequency of this error, but the underlying issue remains — isolated sessions should not be inheriting parent model state.

Impact

~27 cron jobs across 5 agents were failing simultaneously due to this issue, causing all daily reports, reminders, research tasks, and health checks to stop functioning.

extent analysis

TL;DR

Isolated cron job sessions are throwing LiveSessionModelSwitchError due to inheriting the parent agent's live session model, and a potential fix involves ensuring the isolated session starts with the specified model directly.

Guidance

  • Verify that the sessionTarget: "isolated" configuration is correctly applied to the cron job, and the payload.model is set to the desired model (e.g., google-gemini-cli/gemini-3.1-flash-lite-preview).
  • Check the OpenClaw version (2026.3.28) for any known issues or updates related to isolated cron job sessions and model switching.
  • Test the workaround of using a model from the same provider family as the parent agent (e.g., anthropic/claude-haiku-3-5) to reduce the frequency of the error, while investigating the root cause.
  • Investigate the possibility of a configuration or code issue that causes the isolated session to inherit the parent agent's live session model, rather than starting with the specified model.

Example

No code snippet is provided as the issue does not contain explicit code references.

Notes

The provided information suggests a potential issue with the OpenClaw version or configuration, but further investigation is needed to determine the root cause. The workaround may help reduce the frequency of the error, but it does not address the underlying issue.

Recommendation

Apply the workaround of using a model from the same provider family as the parent agent, while investigating the root cause of the issue, as it may help reduce the frequency of the error and provide more insight into the problem.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING