anthropics / anthropics/claude-code

Desktop scheduled tasks: model selection broken end-to-end (spawns ignore user settings; documented picker absent; MCP tool lacks model param)

Ouverte
#91,884 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
area:desktop area:routines bug documentation has repro platform:macos
Langage dominant
Python
Étoiles
145k
Forks
23.1k
Métriques de merge des PR
Métriques de PR en attente

Description

# Bug report: Desktop scheduled tasks — model selection broken end-to-end

**Environment:** Claude Desktop (macOS) 1.24012.9, claude-code CLI 2.1.219+, macOS Darwin 25.5.0.
Two desktop profiles under one account, each with its own scheduled-task registry.

## Summary

There is currently **no working way to control which model a desktop scheduled task runs on**, and scheduled-task spawns only sometimes honor user settings.
Three independent defects compound:

### 1. Scheduled-task spawns ignore user settings on most runs (primary bug)

User settings: `"model": "best"`, `"effortLevel": "xhigh"`, `"fallbackModel": ["claude-opus-5"]`, no env overrides, no managed settings.
Across **148 scheduler-spawned sessions (Jun 3 – Sep 3)** the session records show exactly two spawn profiles:

- **Profile A (116 sessions):** stamps the newest Opus `[1m]` model, no `effort` key, no `sessionSettings`. Ignores user settings entirely. Never once produced Fable 5 (consistent with no `fable[1m]` variant existing).
- **Profile B (32 sessions):** inherits user settings and the app's live ultracode state (`sessionSettings: {"ultracode": true}`, `effort: "xhigh"`, model resolving per the `best` alias → `claude-fable-5`). Every observed Fable run is Profile B.

Which profile a run gets **flips per run, not per task** — e.g. on 2026-09-03 the 07:53 task spawned Profile B (`claude-fable-5`, ultracode) and the 08:24 task spawned Profile A (`claude-opus-5[1m]`), same build, same profile, 31 minutes apart.
Selection is recorded nowhere (task store, session records, settings) and matches no documented behavior.

### 2. The documented Edit-form model picker is absent

`desktop-scheduled-tasks` docs: *"The instructions input includes pickers for the permission mode and model."*
In build 1.24012.9 the Edit form shows **no model picker**. No changelog entry indicates when this feature shipped or its gating.

### 3. The documented "ask Claude" fallback cannot work

Same docs say the task model can be changed "through the Edit form **or ask Claude**."
The `update_scheduled_task` / `create_scheduled_task` MCP tools accept only
`taskId, prompt, description, cronExpression, fireAt, enabled, notifyOnCompletion` — **no model parameter** (schema re-fetched 2026-08-03, 2026-08-21, 2026-09-03; unchanged).
The task store (`claude-code-sessions///scheduled-tasks.json`) carries no model-like key on any of 20 task entries across both profiles.

## Impact

Users who need a specific model on unattended scheduled runs (e.g. Fable 5 with Opus fallback) cannot get it deterministically:
~78% of runs draw Profile A and silently execute on a model the user did not choose, at default effort, with ultracode orchestration silently absent.
Headless runs surface no notice of any of this.

## Requests

1. Make all scheduled-task spawns resolve model/effort from user settings (or document why Profile A exists and how to disable it).
2. Ship the per-task model picker the docs already describe, or correct the docs.
3. Add `model` (and ideally `effort`) parameters to `update_scheduled_task` / `create_scheduled_task` so the documented "ask Claude" path works.

## Evidence available on request

Full session-record analysis (148 spawns with timestamps/models/effort/sessionSettings), task-store dumps from both profiles, settings history with backups.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Start by reading the desktop-scheduled-tasks documentation and inspecting the scheduled-tasks.json entries under claude-code-sessions//. Re-fetch the create_scheduled_task and update_scheduled_task MCP schemas and compare them with the documented Edit form. Done means the model selection behavior, picker, and MCP parameters are either implemented consistently or the documentation explains their actual limits.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
macos
Domaine
api, desktop, documentation
Type d'issue
Bug
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
Active
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.