Scheduled tasks (routines) reset run mode from "auto" to "manual" on every restart

Status Open
Reported on v2.1.210
Maintainer reply None cached
Activity 3 comments · opened Jul 17, 2026

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

  1. Create one or more scheduled tasks (routines) in Claude Code.
  2. Set each routine's run mode to "auto".
  3. Fully close and restart Claude Code.
  4. 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_

View original on GitHub ↗

3 Comments

seven7out · 1 month ago

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 (and stale) labels be revisited?

seven7out · 1 month ago

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.json has an optional permissionMode field, and the dispatcher's buildSessionStartEvent forwards permissionMode: task.permissionMode into ccdSessionStart. A record without that field therefore starts every run in default ("Manual").

The Routines pane's Auto/Manual control never writes that field. main.log shows it calling LocalSessions.setPermissionMode on the live run session only, so the selection is lost at the next dispatch and at every restart. The main-process updateScheduledTask IPC already accepts permissionMode, so the fix looks like a one-liner in the renderer: persist the toggle through updateScheduledTask({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.

seven7out · 1 month ago

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.json has an optional permissionMode field, and the dispatcher's buildSessionStartEvent forwards permissionMode: task.permissionMode into ccdSessionStart. A record without that field therefore starts every run in default ("Manual").

The Routines pane's Auto/Manual control never writes that field. main.log shows it calling LocalSessions.setPermissionMode on the live run session only, so the selection is lost at the next dispatch and at every restart. The main-process updateScheduledTask IPC already accepts permissionMode, so the fix looks like a one-liner in the renderer: persist the toggle through updateScheduledTask({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.