Routines
Routines are persistent, cloud-hosted Claude Code agents that run automatically on a schedule, in response to an API call, or when a GitHub event fires — without you keeping a terminal open.
Research preview (April 2026): Routines launched 14 April 2026. Behaviour, daily limits, and the API surface may change while the feature is in preview.
What Is a Routine?
A routine is a saved Claude Code configuration consisting of three things: a prompt (the instructions Claude runs), one or more GitHub repositories to work in, and a set of connectors (MCP services the routine is allowed to use). Once configured, each trigger creates a fresh, isolated cloud session on Anthropic-managed infrastructure — Claude executes the task autonomously, with no approval prompts and no need for your machine to be on.
This is distinct from the session-local /loop skill, which runs inside your current terminal session and stops when you close it.
Three Trigger Types
A routine can have any combination of these triggers attached to it:
Scheduled trigger
Runs on a recurring cadence — hourly, daily, weekdays, or weekly — or once at a specific future time. Minimum interval is one hour. Your local timezone is converted automatically. One-off runs do not count against the daily routine cap.
API trigger
An HTTP POST to a per-routine endpoint fires a run immediately. The request body accepts an optional text field for run-specific context (e.g., a monitoring alert body or failing log snippet). The response returns a session URL and ID so you can watch the run live. Useful for wiring routines into CI/CD pipelines or monitoring tools.
GitHub trigger
Fires when a repository event occurs. Supported events: pull request lifecycle (opened, closed, assigned, labeled, synchronized), and releases (created, published, edited, deleted). Filters are available for author, branch, labels, draft status, and more. Requires the Claude GitHub App installed on the target repository.
Routines vs /loop
| Aspect | Routines | /loop |
|---|---|---|
| Execution location | Anthropic cloud VM | Your local terminal session |
| Persistence | Runs when your machine is off | Stops when session closes |
| Minimum interval | 1 hour | No minimum (can run every minute) |
| Local access | No — cloud only | Yes — full local filesystem |
| Best for | Set-and-forget automation | Active-session short-lived polling |
Projects and Environments
Each routine runs inside an environment — a cloud runtime configuration that controls what the session can access. You configure environments from the web UI or the /remote-env CLI command.
What carries into the session
- •
CLAUDE.md,.claude/settings.jsonhooks,.mcp.jsonservers - • Skills, agents, and custom commands committed to the repo
- • Plugins declared in the repo's settings
- • Pre-installed runtimes: Python, Node, Go, Rust, Java, Docker, PostgreSQL, Redis, and more
What does NOT carry over
- • User-level
~/.claude/CLAUDE.md - • MCP servers added locally with
claude mcp add - • Interactive auth (e.g. AWS SSO) — no secrets store yet
- • Static API tokens/credentials
Network access has four levels: None, Trusted (default — package registries, GitHub, and 100+ common dev domains), Full (any domain), or Custom. You can also define environment variables and a setup script that runs once and is cached for ~7 days, so dependencies are already installed at session start.
Creating a Routine
Two ways to create routines:
- Web UI at
claude.ai/code→ Routines → New Routine: name it, write the prompt, pick repositories, select an environment, choose trigger type(s), review connectors, click Create. - CLI via
/schedule:/schedule daily PR review at 9am(recurring) or/schedule clean up feature flag in one week(one-off). CLI creates scheduled triggers only — add API or GitHub triggers on the web after.
Managing Routines
From the web UI
- • Run now — trigger a run immediately from the detail page
- • Edit — change name, prompt, repositories, environment, or triggers
- • Pause / Resume — toggle from the Repeats section without deleting
- • Delete — removes the routine; past run sessions remain in session list
- • Filter sidebar — filter by Status (Active / Archived), Project, Environment, Last activity
From the CLI
- •
/schedule list— view all routines - •
/schedule update— modify an existing routine - •
/schedule run— trigger a run now
Plan Limits
Pro
5 routine runs / day
Max
15 routine runs / day
Team / Enterprise
25 routine runs / day
One-off scheduled runs do not count against the daily cap. Routine runs draw down subscription usage the same as interactive sessions. Team/Enterprise plans with extra usage enabled can continue on metered overage after the cap is hit.
Common Use Cases
Scheduled — nightly
Backlog triage: read new issues, apply labels, assign owners, post summary to Slack
GitHub — PR opened
Bespoke code review: apply checklist, leave inline comments, add summary
API — from monitoring tool
Alert triage: pull stack trace, correlate with recent commits, open draft PR with proposed fix
API — from CI/CD pipeline
Deploy verification: run smoke checks, scan error logs, post go/no-go to release channel
Scheduled — weekly
Docs drift: scan merged PRs, flag outdated docs, open update PRs
GitHub — PR merged
Cross-repo port: port a change merged in one SDK to a parallel SDK in another language
Security and Isolation
Each routine run executes in an isolated, Anthropic-managed VM. All outbound traffic passes through Anthropic's proxy for abuse prevention. GitHub authentication uses a scoped credential proxy — your tokens are never inside the sandbox directly. By default, Claude can only push to claude/-prefixed branches; enable "Allow unrestricted branch pushes" per repository if you need Claude to push to other branches.
Because cloud sessions run from Anthropic's infrastructure, IP allowlisting on external services is incompatible with routines — the outbound IP is not your network's IP.
Checklist: Do You Understand This?
- A routine runs on Anthropic cloud infrastructure — your machine does not need to be on
- Three trigger types: scheduled (min 1 hour), API (HTTP POST), GitHub (repo events)
- Routines vs /loop: routines persist; /loop is session-local and has no minimum interval
- Environments control network access, env vars, and setup scripts — cached for ~7 days
- Daily caps: Pro 5, Max 15, Team/Enterprise 25 — one-off runs are exempt from the cap
- Manage via the web UI (Routines sidebar with Status/Project/Environment filters) or CLI (
/schedulecommands)