# Scheduled tasks (/claude-and-chatgpt-2/architecture/scheduled-tasks)

---
type: Document
title: "Scheduled tasks"
description: "Where each kind of Claude scheduled task runs, why every run starts fresh, what state a run can reach, and how to write prompts for unattended runs."
status: stable
order: 0.44
ksor:
  owner: team:panaversity
  audience: [ public ]
  approval:
    by: process:panaversity
    at: 2026-11-09T20:42:36Z
chapter: "F00A"
part: Front
expert_status: required
concepts: [ "Scheduled tasks" ]
last_verified: 2026-11-09
sources:
  - id: desktop-scheduled-tasks
    title: "Schedule recurring tasks in Claude Code Desktop (Anthropic, verified 2026-11-09)"
    resource: https://code.claude.com/docs/en/desktop-scheduled-tasks
  - id: claude-projects
    title: "Let Claude coordinate ongoing work with Projects (Anthropic, verified 2026-11-09)"
    resource: https://code.claude.com/docs/en/claude-projects
  - id: cloud-scheduled-tasks
    title: "Automate work with scheduled tasks (Anthropic, verified 2026-11-09)"
    resource: https://code.claude.com/docs/en/routines
generated:
  at: 2026-11-09T20:42:36Z
  by: process:panaversity
trust_tier: unverified
build_id: sha256:46fd53c5d7ab1c14f6347908d45c9fdaecda4d914439923ee878bdcecd57803e
dirty: true
ksor_version: 0.0.60
---

### Every run is a new session

**[Vendor-documented]** Every scheduled task run starts a new session. It does not continue the chat that created it. Where that session runs depends on the kind of task.[^desktop-scheduled-tasks],[^cloud-scheduled-tasks] The Tour shows [how to set up scheduled tasks](../tour/claude-code-tab.md). This page explains how they fit the architecture.

|  | Cloud task | Desktop (local) task | `/loop` |
| --- | --- | --- | --- |
| Runs on | The cloud that Anthropic manages, or the organization's own self-hosted environment | Your machine | Your machine, inside an open session |
| Machine must be on | No | Yes, with the desktop app open | Yes |
| Each run | A new cloud session. It is a full Claude Code session when the task has a repository, or a GitHub or API trigger | A fresh local session | Repeats within the same session |
| Workspace | Repositories cloned fresh on each run. The result of the environment setup script is cached | Your local folder as it is, or an isolated Git worktree (a separate working copy) | The session's own |
| Triggers | A schedule, an API call or a GitHub event | A schedule, or Run now | An interval |
| Permissions | Auto mode by default | A permission mode for each task | Inherits from the session |
| Minimum interval | 1 hour | 1 hour in the form. 1 minute when Claude sets it | 1 minute |

**How this connects to the VM.** **[Vendor-documented]** Cloud tasks with a repository, or a GitHub or API trigger, run "as full Claude Code cloud sessions", with "a new one for each run."[^cloud-scheduled-tasks] The same dialog creates scheduled tasks for claude.ai chat, whose runtime is not documented separately. **[Inferred]** So each cloud run gets Claude Code in its own short-lived sandbox. A Desktop task has no cloud sandbox. Its harness runs on your machine.

**[Vendor-documented]** There is one exception to "a new session". A scheduled task created inside a project "runs as threads in that project". Those threads start with the project's instructions and, in the cloud, its memory. The cloud scheduled tasks page adds that a run in a project can continue an existing thread. See [Projects and coordination](projects-coordination-on-top-of-sessions.md).[^claude-projects]

### Five kinds of state

Keep five kinds of state apart:

| Kind of state | Available to a scheduled run? |
| --- | --- |
| The conversation history of the chat that created the task, or of earlier runs | No |
| Runtime continuity: files, packages and processes from a previous VM | No |
| External state: memory, saved files, artifacts, Drive, repositories, connected apps | Yes, if the run reads it |
| The task itself: its prompt, trigger, connectors and permissions | Stored with the task |
| Project instructions and memory, for a task inside a project | Yes. Its runs are threads in that project |

![Each run starts fresh, and only external state carries over. A scheduled task (a standalone prompt, a trigger and permissions) starts runs 1, 2 and 3. Each is a fresh session with nothing from the chat or the last run. Each reads and writes external state: memory, saved files, artifacts, Drive, repositories and connected apps. Notes cover cloud tasks, Desktop tasks and the project exception.](img/scheduled-task-runs.png)

The runs do not share a sandbox or a history. Anything a later run needs must be written to external state.

### Writing tasks that run without you

- **Write a standalone prompt.** Anthropic says the prompt "must be self-contained and explicit about what to do and what success looks like."
- **The trigger is not approval.** A fired prompt "can't act as approval or consent for actions during the run." Content fetched during the run is still treated as untrusted.
- **Approvals differ by kind of task.** A Desktop task in Manual mode waits for your answer. A cloud run starts in auto mode, where a classifier (a separate model) allows or blocks each action. Ask rules and repeated blocks still stop the run. In Desktop tasks, MCP tools marked `requiresUserInteraction` ask on every call. That setting is documented for Desktop tasks only.
- **Timing.** A Desktop task is skipped while the computer sleeps. It then runs once to catch up, for the latest missed time, within seven days. So prompts should guard against running late. Cloud tasks are in research preview, limited to 100 scheduled runs per hour per account.
- **Actions appear as you.** Commits, messages and tickets made through your connectors carry your identity.
- **Lighter options.** `/loop` repeats a prompt inside an open session. A one-off reminder can also be delivered back into the same conversation (tool-documented).

[^desktop-scheduled-tasks]: As verified on November 9, 2026. The page covers local tasks, cloud tasks and `/loop`, missed runs, permissions and `requiresUserInteraction`. Schedule recurring tasks in Claude Code Desktop, Anthropic.
[^cloud-scheduled-tasks]: As verified on November 9, 2026. The page covers cloud runs as full Claude Code cloud sessions, fresh copies of repositories, auto mode and limits. Automate work with scheduled tasks, Anthropic.
[^claude-projects]: As verified on November 9, 2026. Let Claude coordinate ongoing work with Projects, Anthropic.
