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.


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.
| Option | Where it runs | Local files | Needs machine on |
|---|---|---|---|
Claude Code /loop | Inside an open CLI session | Yes | Yes (and open session) |
| Claude Code Desktop task | Your computer | Yes | Yes |
| Claude Code cloud task | Anthropic cloud (fresh clone) | No | No |
| Codex Scheduled (Desktop) | Your computer (or worktree) | Yes | Yes (app running) |
| Codex Scheduled (Web) | ChatGPT cloud | No | No |
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.
/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:
/looptasks stay attached to that session and can be restored on--resumeor--continueif they haven't expired. Built-in commands like/clearor/modelaren'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.
Chapter 19 · Schedules and goals › Scheduled prompts → Full Automations and `/goal` guide in the Mirasim docs.
Questions
- What happened to Claude Code routines?
- Anthropic renamed routines to “cloud scheduled tasks” in Claude Code v2.1.332;
/routinesstill 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).
/goalkeeps an agent working turn after turn right now until a completion condition is met.
Article · Codex and Claude Code over SSH: run them on a remote server, and keep them running → Keeping Codex and Claude Code running on a Linux server.
Article · How to use Claude Code: your first session, permission modes, and undoing changes → How to use Claude Code: permissions, commands and daily workflow.
Article · How to use Codex: your first task, permissions, and the commands you'll use → How to use Codex: commands, approvals and config.
Article · Running Claude Code and Codex in GitHub Actions: setup, secrets, and safety → Running Claude Code and Codex in GitHub Actions CI workflows.
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

Fixing OpenAI and Codex 403 “unsupported_country_region_territory”
Why OpenAI and Codex return 403 unsupported_country_region_territory, how to fix false positives on VPNs or cloud IPs, and compliant alternatives.

Running Claude Code and Codex on Amazon Bedrock, Vertex AI, and Microsoft Foundry
Connect Claude Code and Codex to Amazon Bedrock, Vertex AI, and Microsoft Foundry: env vars, config.toml, auth, model pinning, and limits.

Using Claude Code with Chrome and Codex Browser: live debugging, Playwright, and previews
How to connect Claude Code to Chrome (extension, console logs, login limits) and use Codex Browser or Playwright, plus live dev-server previews in Mirasim.