Claude Code Scheduled Tasks and Remote Agents
Every other subject in this track assumes you're at the keyboard: you type a prompt, Claude Code acts, you watch the result, you type the next prompt. That model breaks down the moment you want something to keep happening after you close the laptop, or want to check on a session from somewhere that isn't your desk. A CI run that takes eight minutes shouldn't require you to sit and refresh. A nightly triage pass shouldn't require you to be awake at 2am. A long migration you kicked off before lunch shouldn't be unreachable from your phone.
Claude Code has an answer for each of these, and the answers are genuinely different mechanisms, not one feature with different names. Confusing them is the single most common mistake in this space: reaching for a cloud routine when /loop would do, or expecting a desktop scheduled task to do something only Remote Control can. This subject builds a decision framework first, then goes mechanism by mechanism — in-session polling, desktop schedules, cloud routines, goal-directed sessions, remote control, and the two ways sessions talk to the outside world — and closes with the safety discipline unattended execution demands.
The Time/Place-Shifting Spectrum
Every mechanism in this subject shifts one of two things: when work happens relative to you being present, or where you're able to reach it from. It helps to see them on one spectrum before learning any of them in depth.
| Mechanism | What it shifts | Requires your machine on? | Requires an open session? | Where it runs |
|---|---|---|---|---|
/loop (fixed or self-paced) |
When, within an already-open session | Yes | Yes | Your machine |
/goal |
When, within an already-open session (turn-driven, not time-driven) | Yes | Yes | Your machine |
| Desktop scheduled tasks | When, as fresh sessions the Desktop app starts for you | Yes | No | Your machine |
| Cloud routines | When and what triggers it (schedule, API call, GitHub event) | No | No | Anthropic-managed cloud (or your self-hosted environment) |
| Remote Control | Where you can drive from, not when work happens | Yes | Depends — starts one for you | Your machine |
| Cross-session messaging & channels | Where events reach an already-running session | Yes | Yes | Your machine |
Reading down that table is itself a decision procedure. "Should this keep happening while I'm mid-session" → /loop or /goal. "Should this happen on its own, starting fresh, on my machine" → a desktop scheduled task. "Should this happen even if my machine is off" → only cloud routines qualify. "I need to check on or steer something I already started, from a different device" → Remote Control. "Let an external event — a chat message, a webhook, another one of my sessions — reach a session I already have open" → cross-session messaging or channels, not scheduling at all.
The rest of this subject fills in each row: first the ways to keep work moving without retyping a prompt, then the ways to run work while absent entirely, then the ways to reach into or steer sessions remotely, and finally the safety habits that make trusting any of it reasonable.