Scheduled tasks (routines) reset run mode from "auto" to "manual" on every restart
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I set every scheduled task (routine) to run in "auto" mode so they execute autonomously. After restarting Claude Code, all routines had reverted to "manual" mode. The per-routine run mode is not persisted across sessions/restarts, so it has to be re-set by hand every time.
What Should Happen?
The run mode chosen per routine (auto vs. manual) should persist across restarts. Ideally there is also a global default so all new/existing routines can be set to "auto" once. Related: it would help to be able to pin a model per routine (e.g. default Sonnet, Opus only where needed) — currently routines seem to follow the globally selected model with no per-routine override.
Error Messages/Logs
Steps to Reproduce
- Create one or more scheduled tasks (routines) in Claude Code.
- Set each routine's run mode to "auto".
- Fully close and restart Claude Code.
- Open the routines list again.
Expected: routines still on "auto". Actual: all reverted to "manual".
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.210
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
3 Comments
Confirming this on macOS as well — not Windows-specific.
Environment: macOS 26.6.1 (25G76), Claude desktop app 1.34493.1, Claude Code 2.1.74
Repro: Set a routine's run mode to Auto in the Routines pane → quit and relaunch the app → the routine shows Manual again. Happens on every restart, for every routine (two recurring routines on this machine).
The routines' scheduled runs themselves still fire on time; only the Auto/Manual run-mode selection is lost across restarts.
Since this reproduces on macOS, could the
platform:windows(andstale) labels be revisited?Root cause, from reading the desktop app bundle (macOS app 1.46388.4, Claude Code 2.1.260):
Each CCD routine record in
claude-code-sessions/<account>/<org>/scheduled-tasks.jsonhas an optionalpermissionModefield, and the dispatcher'sbuildSessionStartEventforwardspermissionMode: task.permissionModeintoccdSessionStart. A record without that field therefore starts every run indefault("Manual").The Routines pane's Auto/Manual control never writes that field. main.log shows it calling
LocalSessions.setPermissionModeon the live run session only, so the selection is lost at the next dispatch and at every restart. The main-processupdateScheduledTaskIPC already acceptspermissionMode, so the fix looks like a one-liner in the renderer: persist the toggle throughupdateScheduledTask({scheduledTaskId, permissionMode})instead of (or in addition to) the session-level call.Workaround that holds across restarts: quit the app, add
"permissionMode": "auto"to each task record in that JSON, relaunch. Editing while the app runs does not work because the registry is rewritten whole from memory on every change.Root cause, from reading the desktop app bundle (macOS app 1.46388.4, Claude Code 2.1.260):
Each CCD routine record in
claude-code-sessions/<account>/<org>/scheduled-tasks.jsonhas an optionalpermissionModefield, and the dispatcher'sbuildSessionStartEventforwardspermissionMode: task.permissionModeintoccdSessionStart. A record without that field therefore starts every run indefault("Manual").The Routines pane's Auto/Manual control never writes that field. main.log shows it calling
LocalSessions.setPermissionModeon the live run session only, so the selection is lost at the next dispatch and at every restart. The main-processupdateScheduledTaskIPC already acceptspermissionMode, so the fix looks like a one-liner in the renderer: persist the toggle throughupdateScheduledTask({scheduledTaskId, permissionMode})instead of (or in addition to) the session-level call.Workaround that holds across restarts: quit the app, add
"permissionMode": "auto"to each task record in that JSON, relaunch. Editing while the app runs does not work because the registry is rewritten whole from memory on every change.