openclaw - 💡(How to fix) Fix Bug: cron job payload.model override is ignored, always uses agent default model [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#60825Fetched 2026-04-08 02:46:45
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
closed ×1commented ×1locked ×1

When a cron job is created or edited with a --model override (e.g. ollama/qwen2.5:14b), the model is correctly stored in payload.model in jobs.json, but at runtime the job always uses the agent's default model instead.

Root Cause

When a cron job is created or edited with a --model override (e.g. ollama/qwen2.5:14b), the model is correctly stored in payload.model in jobs.json, but at runtime the job always uses the agent's default model instead.

Fix Action

Fix / Workaround

  • OpenClaw: 2026.4.2
  • OS: Linux (NUC10i5FNH)
  • Agent: main
  • Session target: isolated
  • Reproduced after: delete + recreate job, upgrade to 2026.4.2

Code Example

# Create isolated cron job with model override
openclaw cron add \
  --name "test-job" \
  --cron "0 9 * * *" \
  --session isolated \
  --model "ollama/qwen2.5:14b" \
  --message "Do something."

# Run manually
openclaw cron run <job-id>

---

{
  "model": "claude-sonnet-4-6",
  "provider": "anthropic"
}

---

{
  "payload": {
    "model": "ollama/qwen2.5:14b"
  }
}
RAW_BUFFERClick to expand / collapse

Description

When a cron job is created or edited with a --model override (e.g. ollama/qwen2.5:14b), the model is correctly stored in payload.model in jobs.json, but at runtime the job always uses the agent's default model instead.

Steps to Reproduce

# Create isolated cron job with model override
openclaw cron add \
  --name "test-job" \
  --cron "0 9 * * *" \
  --session isolated \
  --model "ollama/qwen2.5:14b" \
  --message "Do something."

# Run manually
openclaw cron run <job-id>

Expected Behavior

The job runs using ollama/qwen2.5:14b as specified.

Actual Behavior

The job runs using the agent default model (claude-sonnet-4-6). The cron runs output shows:

{
  "model": "claude-sonnet-4-6",
  "provider": "anthropic"
}

Even though jobs.json correctly stores:

{
  "payload": {
    "model": "ollama/qwen2.5:14b"
  }
}

Environment

  • OpenClaw: 2026.4.2
  • OS: Linux (NUC10i5FNH)
  • Agent: main
  • Session target: isolated
  • Reproduced after: delete + recreate job, upgrade to 2026.4.2

extent analysis

TL;DR

The issue can likely be resolved by ensuring that the --model override is properly propagated to the runtime environment, potentially by modifying the cron job execution logic to prioritize the payload.model value over the agent's default model.

Guidance

  • Verify that the payload.model value is correctly stored in jobs.json and that the file is being read correctly by the cron job execution logic.
  • Check the cron job execution code to ensure that it is using the payload.model value instead of the agent's default model.
  • Consider adding logging or debugging statements to the cron job execution code to determine where the default model is being overridden.
  • Review the OpenClaw documentation to see if there are any known issues or configuration options related to model overrides in cron jobs.

Example

No code snippet is provided as the issue does not contain sufficient information about the implementation details of the cron job execution logic.

Notes

The issue may be specific to the OpenClaw version (2026.4.2) or the Linux environment, and further testing may be needed to determine the root cause.

Recommendation

Apply a workaround by modifying the cron job execution logic to prioritize the payload.model value, as the root cause of the issue is likely related to the propagation of the --model override to the runtime environment.

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