Skip to content

Cron model field overridden by agent default model #28905

Description

@ryan-superintelligent

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

  1. Set agent default model to anthropic/claude-opus-4-6 in openclaw.json
  2. Create a cron job with --model anthropic/claude-sonnet-4-5 (or even anthropic/claude-haiku-3.5)
  3. Run the cron: openclaw cron run <id>
  4. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions