claude-code - 💡(How to fix) Fix Scheduled tasks: add `model` parameter to create/update_scheduled_task API

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…

Fix Action

Fix / Workaround

As a workaround, users add a `model:` field to SKILL.md frontmatter — but this field is silently ignored at runtime. The task always runs on the global model, leading to expensive Opus burns on tasks that only needed Haiku.

  • All scheduled tasks currently run on whatever model the user last selected in the UI
  • If a user switches to Opus for interactive work and forgets to switch back, all overnight scheduled tasks burn Opus tokens
  • Users trying to be cost-conscious by specifying `model: haiku` in SKILL.md get no benefit — the field is ignored
  • No API-level workaround exists today

Code Example

create_scheduled_task(taskId, prompt, description, cronExpression?, fireAt?, model?)
update_scheduled_task(taskId, model?)
RAW_BUFFERClick to expand / collapse

Problem

The `create_scheduled_task` and `update_scheduled_task` MCP tools have no `model` parameter. When a scheduled task fires, it uses whatever model the Claude Code application currently has selected globally — there is no way to pin a task to a specific model (e.g. Haiku for a lightweight nightly check, Sonnet for a more complex weekly scan).

As a workaround, users add a `model:` field to SKILL.md frontmatter — but this field is silently ignored at runtime. The task always runs on the global model, leading to expensive Opus burns on tasks that only needed Haiku.

Expected behaviour

`create_scheduled_task` and `update_scheduled_task` should accept an optional `model` parameter (e.g. `"claude-haiku-4-5-20251001"`, `"claude-sonnet-4-6"`) that is persisted and used when the task fires, regardless of the global model setting.

Impact

  • All scheduled tasks currently run on whatever model the user last selected in the UI
  • If a user switches to Opus for interactive work and forgets to switch back, all overnight scheduled tasks burn Opus tokens
  • Users trying to be cost-conscious by specifying `model: haiku` in SKILL.md get no benefit — the field is ignored
  • No API-level workaround exists today

Proposed API change

create_scheduled_task(taskId, prompt, description, cronExpression?, fireAt?, model?)
update_scheduled_task(taskId, model?)

The `model` value should accept the same strings accepted by `--model` flag / `settings.json "model"` field (aliases like `"haiku"` or full IDs like `"claude-haiku-4-5-20251001"`).

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

claude-code - 💡(How to fix) Fix Scheduled tasks: add `model` parameter to create/update_scheduled_task API