← Blog

How-to5 min read

Scheduled tasks in Claude Code and Codex: /loop, cloud tasks, and recurring automations

How to schedule recurring tasks in Claude Code (/loop, Desktop, cloud scheduled tasks) and Codex, plus commitable Automations across 11 agents in Mirasim.

Checking scheduled coding-agent runs on desktop and phone in MirasimChecking scheduled coding-agent runs on desktop and phone in Mirasim

The short answer

Claude Code has three ways to run prompts on a schedule: /loop inside an open session, Desktop scheduled tasks on your machine, and cloud scheduled tasks (formerly routines) on Anthropic's cloud. Codex puts scheduled tasks in the ChatGPT desktop app (for local projects and worktrees) and ChatGPT web (cloud only) — Codex CLI and the IDE extension don't have a schedule manager.

OptionWhere it runsLocal filesNeeds machine on
Claude Code /loopInside an open CLI sessionYesYes (and open session)
Claude Code Desktop taskYour computerYesYes
Claude Code cloud taskAnthropic cloud (fresh clone)NoNo
Codex Scheduled (Desktop)Your computer (or worktree)YesYes (app running)
Codex Scheduled (Web)ChatGPT cloudNoNo

Scheduling in Claude Code: /loop, Desktop, and Cloud

For short-lived polling while you are working — watching a deploy, checking a PR, or babysitting a long build — type /loop right in the terminal. Both the interval and prompt are optional: give both for a fixed schedule, or pass a prompt alone to let Claude pick the interval.

Examples of /loop inside an open Claude Code session
/loop 10m check if the staging deploy finished and report any failed checks
/loop 30m /review-pr 1234
/loop check my open PRs and summarize their status
  • Session-scoped: /loop tasks stay attached to that session and can be restored on --resume or --continue if they haven't expired. Built-in commands like /clear or /model aren't executed as scheduled fires.
  • Desktop scheduled tasks: survive restarts without keeping a session open, have access to your local files and MCP config, and run on your machine (minimum 1 hour in the form, or 1 minute when Claude sets it).
  • Cloud scheduled tasks (formerly routines): run in Anthropic's cloud on a schedule (minimum 1 hour), API call, or GitHub event without your computer being on, using a fresh clone and Auto mode by default.

Scheduled tasks in Codex

OpenAI manages Codex recurring tasks under **Scheduled** in the ChatGPT desktop app and on ChatGPT web. Codex CLI and the IDE extension don't include a schedule manager — you use them to prepare or test prompts and skills, then schedule them from the app or web.

  • ChatGPT desktop app: can run in your local project folder or an isolated Git worktree. Your computer must stay on and the app must stay running.
  • ChatGPT web: runs in the cloud with uploaded context, skills, and connected tools, and can also fire on supported app events on eligible plans, but cannot touch a local directory.
  • Teams: workspace admins can set up Team Tasks running in the cloud through a team service account.

Automations across 11 agents in Mirasim

If you use both Claude Code and Codex — or also run Kimi Code, DeepSeek Harness, or Qwen Code — keeping one schedule in Claude Desktop and another in ChatGPT splits your recurring work across apps. Mirasim's **Automations** lets you schedule any of the 11 agents in one place.

  • Create in one sentence: open Automations on the left rail › New automation, describe what to do and when, and review the filled-in Name, Instructions, When, Workspace, Agent and model.
  • Presets or 5-field cron (down to 10 min): run once at a date/time, pick a preset (Daily 9:00, Weekdays 9:00, Hourly, Every 30 min), or write a custom local-time cron expression.
  • Saved with the repository: an automation tied to a workspace is stored in <workspace>/.mirasim/schedules.json, so you can version or share it with the repo.
  • One continuous session, plus phone check-ins: each run continues the automation's own session so results stay in one transcript; three consecutive failures or a missed run surface under Needs attention, and you can inspect them on the phone under More › Automations.

Questions

What happened to Claude Code routines?
Anthropic renamed routines to “cloud scheduled tasks” in Claude Code v2.1.332; /routines still works alongside /schedule.
Can I schedule tasks directly from the Codex CLI?
No. Codex CLI doesn't include the Scheduled management UI — OpenAI directs you to ChatGPT desktop or web, or you can schedule Codex sessions from Mirasim's Automations.
What's the difference between a scheduled task and /goal?
A scheduled task fires on a clock (for example every morning at 9:00). /goal keeps an agent working turn after turn right now until a completion condition is met.

Sources

Checked on November 29, 2026 against Anthropic's Claude Code docs (code.claude.com/docs: scheduled-tasks, routines, changelog v2.1.332) and OpenAI's Codex docs (learn.chatgpt.com/docs/automations). Check those pages for the latest intervals and plan eligibility.

Keep reading