Bug
When a cron job specifies a model in its payload (e.g. anthropic/claude-sonnet-4-5), the agent's default model overrides it at runtime. The session runs on the agent's model, not the cron's.
Repro
- Set agent default model to
anthropic/claude-opus-4-6 in openclaw.json
- Create a cron job with
--model anthropic/claude-sonnet-4-5 (or even anthropic/claude-haiku-3.5)
- Run the cron:
openclaw cron run <id>
- Check session history: every assistant response shows
model: claude-opus-4-6
Evidence
linkedin-publish cron: payload model = anthropic/claude-haiku-3.5, agent = main (default claude-opus-4-6). Session ran on Opus.
Prospecting: Content Scoring cron: payload model = anthropic/claude-sonnet-4-5, agent = prospecting (default claude-sonnet-4-5 in openclaw.json, but agent AGENTS.md instructed Opus). Session ran on Opus.
Expected
The cron payload model field should take precedence over the agent's default model. The precedence should be: cron model > agent default > global default.
Workaround
Adding explicit instructions in the cron prompt message ("Do NOT override your model") and updating the agent's AGENTS.md to not assert a different model for that job. This works but is fragile.
Environment
- OpenClaw 2026.2.25 (4b5d4a4)
- macOS Darwin 24.5.0 (arm64)
Bug
When a cron job specifies a
modelin its payload (e.g.anthropic/claude-sonnet-4-5), the agent's default model overrides it at runtime. The session runs on the agent's model, not the cron's.Repro
anthropic/claude-opus-4-6inopenclaw.json--model anthropic/claude-sonnet-4-5(or evenanthropic/claude-haiku-3.5)openclaw cron run <id>model: claude-opus-4-6Evidence
linkedin-publishcron: payload model =anthropic/claude-haiku-3.5, agent =main(defaultclaude-opus-4-6). Session ran on Opus.Prospecting: Content Scoringcron: payload model =anthropic/claude-sonnet-4-5, agent =prospecting(defaultclaude-sonnet-4-5in openclaw.json, but agent AGENTS.md instructed Opus). Session ran on Opus.Expected
The cron payload
modelfield should take precedence over the agent's default model. The precedence should be: cron model > agent default > global default.Workaround
Adding explicit instructions in the cron prompt message ("Do NOT override your model") and updating the agent's AGENTS.md to not assert a different model for that job. This works but is fragile.
Environment