[FEATURE] create_scheduled_task / update_scheduled_task cannot set the routine's folder (cwd) or worktree isolation

Status Open
Maintainer reply None cached
Activity 0 comments · opened Oct 6, 2026

Summary

When a desktop scheduled task (routine) is created or updated through the create_scheduled_task / update_scheduled_task tools from a Claude Code Desktop session, there is no way to set the task's working folder or enable worktree isolation. The created task always gets the creating session's repository as its folder and has worktree isolation off. The user then has to open each routine in the Edit form and fix these by hand.

Steps to reproduce

  1. In a Claude Code Desktop session whose project is repo A, ask Claude to create a routine for repo B (e.g. "create a daily 02:00 routine that works in ~/repo-b").
  2. Claude calls create_scheduled_task (the only parameters are taskId, prompt, description, cronExpression, fireAt, notifyOnCompletion).
  3. Inspect the routine in the Edit form (or the task store claude-code-sessions/<account>/<profile>/scheduled-tasks.json).

Expected

The tool can set the folder (cwd) and worktree isolation (useWorktree) — the same fields the Edit form exposes — so an agent can create a correctly configured routine end to end.

Actual

  • cwd is the creating session's folder (repo A), not repo B.
  • useWorktree is absent (worktree off), so the routine runs directly in the main checkout. For routines that commit, this is unsafe until the user notices and enables worktree manually.
  • update_scheduled_task cannot change either field afterwards.

Why it matters

Agents are increasingly the ones creating and migrating routines (e.g. moving a dozen routines from another product, or recreating them from a single source-of-truth file). Every routine currently needs a manual Edit-form pass, which defeats the automation and is easy to miss (a routine silently running without worktree isolation).

Related

  • #98449 — allow setting model and effort when creating/updating a routine
  • #94643 — create_scheduled_task has no permission-mode parameter
  • #91884 — desktop scheduled tasks: model selection

Request

Add optional cwd (folder) and useWorktree parameters to create_scheduled_task and update_scheduled_task (ideally together with model / effort / permission mode from the issues above).

Environment

Claude Code Desktop (macOS), observed 2026-10-06.

View original on GitHub ↗