-
-
Notifications
You must be signed in to change notification settings - Fork 40k
Closed as not planned
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
Cron jobs with sessionTarget: "isolated" reject all model overrides except the primary model configured in agents.defaults.model. This prevents cost-effective scheduling using cheaper models like Haiku or Sonnet.
Environment
- OpenClaw version: 2026.2.6-3 (commit f072249)
- OS: Ubuntu 22.04 (Linux 6.8.0-94-generic)
- Node: v22.22.0
Steps to Reproduce
- Configure multiple models in
agents.defaults.models:
agents:
defaults:
model: anthropic/claude-opus-4-5
models:
- anthropic/claude-opus-4-5
- anthropic/claude-sonnet-4
- anthropic/claude-haiku-4
modelAliases:
opus: anthropic/claude-opus-4-5
sonnet: anthropic/claude-sonnet-4
haiku: anthropic/claude-haiku-4- Create an isolated cron job with a non-primary model:
{
"name": "test-sonnet",
"schedule": {"kind": "at", "at": "2026-02-07T19:12:00Z"},
"payload": {"kind": "agentTurn", "message": "Say hello", "model": "sonnet"},
"sessionTarget": "isolated"
}- Wait for job to execute
Expected Behavior
Job runs with the specified model (Sonnet), since it's in the allowedModels list.
Actual Behavior
Job fails immediately with:
error: "model not allowed: anthropic/claude-sonnet-4"
The alias is correctly resolved (sonnet → anthropic/claude-sonnet-4), but the model check still rejects it.
Tested Variants
| Model Specification | Result |
|---|---|
anthropic/claude-opus-4-5 (primary) |
✅ Works |
anthropic/claude-sonnet-4 |
❌ Rejected |
anthropic:jason/claude-sonnet-4 (with profile) |
❌ Rejected |
sonnet (alias) |
❌ Rejected (resolves correctly, then rejected) |
haiku (alias) |
❌ Rejected |
Impact
- Forces all cron jobs to use the most expensive model (Opus)
- Makes
modeloverride in cron payload effectively useless for isolated sessions - Workaround: Use system crontab + external scripts instead of OpenClaw cron
Possible Cause
Isolated sessions may be checking against a different allowlist than main sessions, or the model allowlist isn't being passed to the isolated session context.
Related
This may be related to PR #11198 (@Profile suffix fix), but that fix addressed a different issue (suffix parsing). This bug occurs even without the @ prefix.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working