fix(cron): respect subagents.model in isolated cron sessions#11474
Merged
Takhoffman merged 3 commits intoopenclaw:mainfrom Mar 1, 2026
Merged
fix(cron): respect subagents.model in isolated cron sessions#11474Takhoffman merged 3 commits intoopenclaw:mainfrom
Takhoffman merged 3 commits intoopenclaw:mainfrom
Conversation
Contributor
Author
|
FIx — the subagent model was bypassing the allowlist. Fixed: replaced See commit cc79abf31. |
This was referenced Feb 9, 2026
bfc1ccb to
f92900f
Compare
This was referenced Feb 16, 2026
|
This pull request has been automatically marked as stale due to inactivity. |
cc79abf to
f71a19c
Compare
Contributor
|
Autoland update: fixed integration issues discovered during gate execution, reran full default verification, and merged. What was fixed while landing:
Verification run (worktree
All checks passed before merge. |
steipete
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
…w#11474) * fix(cron): respect subagents.model in isolated cron sessions * fix(cron): enforce model allowlist for subagents.model * Cron: fix isolated subagent model gate regressions --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
safzanpirani
pushed a commit
to safzanpirani/clawdbot
that referenced
this pull request
Mar 2, 2026
…w#11474) * fix(cron): respect subagents.model in isolated cron sessions * fix(cron): enforce model allowlist for subagents.model * Cron: fix isolated subagent model gate regressions --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
hanqizheng
pushed a commit
to hanqizheng/openclaw
that referenced
this pull request
Mar 2, 2026
…w#11474) * fix(cron): respect subagents.model in isolated cron sessions * fix(cron): enforce model allowlist for subagents.model * Cron: fix isolated subagent model gate regressions --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Mar 2, 2026
…w#11474) * fix(cron): respect subagents.model in isolated cron sessions * fix(cron): enforce model allowlist for subagents.model * Cron: fix isolated subagent model gate regressions --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…w#11474) * fix(cron): respect subagents.model in isolated cron sessions * fix(cron): enforce model allowlist for subagents.model * Cron: fix isolated subagent model gate regressions --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
Mateljan1
pushed a commit
to Mateljan1/openclaw
that referenced
this pull request
Mar 7, 2026
…w#11474) * fix(cron): respect subagents.model in isolated cron sessions * fix(cron): enforce model allowlist for subagents.model * Cron: fix isolated subagent model gate regressions --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
…w#11474) * fix(cron): respect subagents.model in isolated cron sessions * fix(cron): enforce model allowlist for subagents.model * Cron: fix isolated subagent model gate regressions --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
ogt-redknie
pushed a commit
to ogt-redknie/OPENX
that referenced
this pull request
May 2, 2026
…w#11474) * fix(cron): respect subagents.model in isolated cron sessions * fix(cron): enforce model allowlist for subagents.model * Cron: fix isolated subagent model gate regressions --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
7 tasks
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
…w#11474) * fix(cron): respect subagents.model in isolated cron sessions * fix(cron): enforce model allowlist for subagents.model * Cron: fix isolated subagent model gate regressions --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #11461
agents.defaults.subagents.modelis ignored when spawning isolated cron sessions. All isolated sessions fall back toagents.defaults.model.primary, regardless of the subagents config. This means users can't use cheaper local models (e.g. Ollama) for background cron work while keeping premium models for interactive sessions.lobster-biscuit
Repro Steps
agents.defaults.subagents.modelto a different model than the main agent model:{ "agents": { "defaults": { "model": { "primary": "anthropic/claude-sonnet-4-5" }, "subagents": { "model": "ollama/llama3.2:3b" } } } }sessionTarget: "isolated"(no explicit--model)anthropic/claude-sonnet-4-5instead ofollama/llama3.2:3bRoot Cause
In
src/cron/isolated-agent/run.ts,resolveConfiguredModelRef()only checkscfg.agents.defaults.model.primaryand never checkscfg.agents.defaults.subagents.model. The correct pattern already exists insessions-spawn-tool.tswhich properly resolves subagent models.Behavior Changes
agents.defaults.subagents.model(and per-agentsubagents.model) when selecting the default model.subagents.modelis not configured (falls back to main model as before).normalizeModelSelectionfromsessions-spawn-tool.tsinto sharedmodel-selection.tsto avoid duplication.Codebase and GitHub Search
sessions-spawn-tool.tsfor reference implementation of subagent model resolution.resolveConfiguredModelRefonly checksagents.defaults.model, confirmed the gap.Tests
isolated-agent.subagent-model.test.ts):subagents.modelwhen set (string format)subagents.modelsubagents.modelis unset{primary}object format forsubagents.modelmodel-selection.test.ts):normalizeModelSelectionutility coverageManual Testing
N/A — fully covered by automated tests.
Sign-Off
sessions-spawn-tool.tspattern.normalizeModelSelectionwas extracted to a shared module to avoid duplication.Made with Cursor
Greptile Overview
Greptile Summary
This change fixes isolated cron sessions to respect
agents.defaults.subagents.model(and per-agentsubagents.model) when choosing the default model, matching the existing behavior insessions-spawn-tool.ts. To avoid duplication, it extractsnormalizeModelSelectionintosrc/agents/model-selection.tsand adds unit + integration coverage for the new resolution behavior.Confidence Score: 3/5
subagents.modelresolution path inrunCronIsolatedAgentTurndoes not enforce the model allowlist in the way the explicit job override does, which can lead to running disallowed models in allowlist configurations.Context used:
dashboard- CLAUDE.md (source)dashboard- AGENTS.md (source)