Repository navigation
[FEATURE] Add delete_scheduled_task to the scheduled-tasks MCP (Cowork) #59981
Description
Activity
- addedenhancementNew feature or requestNew feature or requestplatform:windowsIssue specifically occurs on WindowsIssue specifically occurs on Windows
on May 17, 2026 This is a clean case of the MCP server owning state that the user can't reach through the protocol — the rewrite-every-few-minutes behaviour is the giveaway. The in-memory map is the source of truth and the JSON file is just a periodic snapshot, so any out-of-band edit is racing the next flush and losing.
A couple of notes from running into the same shape on adjacent MCP servers:
-
The asymmetric tool surface is the actual bug, not just a missing verb.
create / list / updatewithoutdeleteimplies the server thinks "disabled" is the terminal state for a task and that list-filtering on the client side is the intended UX. The reality is that long-lived sessions accumulate a backlog of disabled tasks that you'd want gone for the same reasons you'd close-and-archive a Jira ticket — they pollute auto-complete, scroll the active task off-screen, and makelist_scheduled_tasksresults unparseable to downstream agents that don't know to filter. Adelete_scheduled_taskis the right verb; anarchive_scheduled_task(separate fromenabled:false) would also work and is arguably more honest about cron-style semantics. -
The
force:trueflag belongs on the currently-running axis, not the enabled axis. Refusing to delete anenabled:truetask withoutforceis a fine guardrail, but the more dangerous case is deleting a task whose handler is mid-execution — that one should requireforce:true(and ideally return arunning_invocation_idin the error so the caller can decide whether to wait or kill).enabled:false+ currently-running can happen if the task just got disabled but the in-flight invocation hasn't returned yet. -
Atomic-write contract matters here more than usual. Because the file is rewritten on a timer, the failure mode if
delete_scheduled_taskwrites-then-crashes mid-write is that the next periodic flush silently resurrects the deleted entry from the in-memory map. The delete needs to (a) remove from in-memory state, (b) cancel/flush any pending periodic-write timer, (c) write the new snapshot atomically (write-temp + rename), then (d) re-arm the periodic timer. If (a) and (c) aren't in the same critical section, you've shipped a bug.
Adjacent symptom worth flagging on this issue for posterity: when the disabled-task list grows past ~5 entries, the
list_scheduled_tasksresponse gets large enough that some MCP clients truncate it before the model sees the active task. The "can't delete" bug is also a "can't see the active task" bug at scale.-
- marked Cowork scheduled-tasks MCP: 3 issues with UNC/junction paths after storage migration #61445 as a duplicate of this issue
on May 22, 2026 +1 — also hitting this on Windows after migrating scheduled-tasks storage to a network share via NTFS junction. Built a filesystem-side cleanup handler (cron-driven, dry-run-first) as workaround, but the register-side ghosts described in your issue are by-design unreachable from the MCP — so the cleanup is half-coverage.
Originally filed as #61445 (3-bug cluster: no-delete + path-traversal-UNC + filesystem-ghost-orphan). Closed as duplicate of this issue + #56244 (path traversal). Linking here for cross-ref.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.
- locked as resolved and limited conversation to collaborators
on Aug 24, 2026
Summary
The Cowork
scheduled-tasksMCP exposes onlycreate_scheduled_task,list_scheduled_tasks, andupdate_scheduled_task. There is nodelete_scheduled_task. Disabled or obsolete tasks accumulate in the list permanently and cannot be removed from inside Claude Code.Reproduction
create_scheduled_task(or via the Cowork UI).update_scheduled_task(taskId: "...", enabled: false).list_scheduled_tasks— the disabled task still appears.Editing the underlying state file does not help: the MCP keeps the canonical state in memory and rewrites the file every few minutes, restoring the entries.
Tested state file (Windows):
%APPDATA%\Claude\claude-code-sessions\<accountId>\<sessionId>\scheduled-tasks.jsonObserved sequence on my machine (2026-05-17):
list_scheduled_taskslikewise.Impact
update_scheduled_taskaccepts nodelete: trueflag, so even a privileged side-channel deletion is unavailable.Proposed fix
Add
delete_scheduled_task(taskId)to the MCP:enabled: trueunlessforce: trueis provided (safety check against accidental deletion of live schedules).{ deleted: true, taskId }or an error if thetaskIddoes not exist.Environment
scheduled-tasks(Cowork)