Routines
A saved Claude Code configuration — a prompt + one or more repositories + connectors/MCP, packaged once and run automatically on Anthropic-managed cloud infrastructure, with your laptop closed. Each routine fires on one or more triggers: a schedule, a GitHub event, or an API call. Part of Claude Code on the web.
Analogy โ a cron job with a brain, run in someone else’s data center. You write the standing order and hand over the keys (which repos, which connectors); the cloud wakes it on a timer, a repo event, or a webhook, and it does the whole job unattended — with no one at the keyboard to approve anything.
Mechanism โ a saved config + triggers
A routine packages a prompt, one or more repositories, an environment, and connectors into one saved object on your claude.ai account. A trigger then runs it as a full autonomous cloud session:
the config
schedule / GitHub / API
a cloud session
# CLI: scheduled triggers only (API/GitHub triggers are added on the web)
/schedule daily PR review at 9am # create a recurring routine, conversationally
/schedule in 2 weeks, remove the feature flag # a one-off future run
/schedule list # see all routines
/schedule update # edit cadence / set a custom cron
/schedule run # fire a one-off run now
# API trigger: each routine exposes its own /fire endpoint (illustrative)
curl -X POST https://api.anthropic.com/.../routines/<routine-id>/fire \
-H "Authorization: Bearer $ROUTINE_TOKEN" \
-H "anthropic-beta: experimental-cc-routine-2026-04-01" \ # experimental beta header
-H "content-type: application/json" \
-d '{"text":"optional run-specific context, e.g. an alert body"}'
Triggers, environment & branch reach
Triggers (combinable in one routine): Scheduled โ recurring (hourly/daily/weekdays/weekly, min
interval 1 h) or a one-off future run; custom cron via /schedule update. API โ per-routine
POST /fire with a bearer token + optional text. GitHub โ pull_request.* /
release.* with filters (author, base/head branch, labels, draft/merged). Each GitHub event starts its own session.
Environment: default Trusted network (package registries + common dev domains only); configurable
network access, environment variables/secrets, and a cached setup script. Branches: by default a run can only
push to claude/-prefixed branches unless Allow unrestricted branch pushes is enabled per repo.
Identity & limits: belongs to your individual claude.ai account; actions appear as you (your GitHub identity, your connectors). Draws down subscription usage like an interactive session, plus a per-account daily run cap (one-off runs exempt). Admins can disable routines org-wide.
When to reach for it
When not to
Best practices
claude/-branch restriction on; only enable unrestricted pushes where you truly need it./schedule run) before trusting the cadence — one-off runs are exempt from the daily cap.