Claude Code Routines: Put Your AI Agent on Cloud Autopilot
Anthropic just shipped Routines — a new feature that lets you package a Claude Code prompt, repository, and connectors once, then run it automatically on a schedule, via an API call, or in response to a GitHub event. The kicker: it all runs on Anthropic's cloud. Your laptop can be closed.
What is a Routine?
A Routine is a saved Claude Code configuration. It has four parts:
- A prompt — what you want Claude to do every time it runs
- One or more repositories — the codebase context to work against
- Connectors — integrations like Slack, Linear, GitHub, and Google Drive that Claude can read from and write to
- At least one trigger — when and how the Routine fires
Configure these once from the web, the desktop app, or the CLI. From that point on, Claude runs autonomously on Anthropic's infrastructure — no need to keep your machine running, no cron jobs to manage, no server to maintain.
Three trigger types
⏰ Schedule
Run on a recurring cadence — hourly, nightly, weekly. Claude works against your repo and connectors on the clock, no human needed.
⚡ API
Fire on demand via an HTTP POST to the routine's endpoint. Your monitoring tools, CI pipelines, or custom scripts become the trigger.
🐙 GitHub
Respond to repository events: PRs, pushes, issues, check runs, workflow completions, discussions, and more. Each matching event starts its own session.
A single Routine can have multiple triggers — the same automation can run nightly on a schedule and be triggered via API when an alert fires.
Run limits by plan
Six use cases that matter right now
-
Nightly backlog triage Every weeknight, Claude reads new issues from your issue tracker, applies labels, assigns owners based on code ownership, and posts a summary to Slack. Your team arrives each morning with a pre-sorted inbox.
-
Weekly docs drift detection Once a week, Claude scans merged PRs, identifies documentation that references changed APIs, and opens update PRs with draft content. Docs stay in sync without a manual review cycle.
-
Automated code review on every PR A GitHub trigger fires on each pull request. Claude runs a security and style review against your custom checklist before a human reviewer looks at it — catching obvious issues before they land in the queue.
-
Alert triage and draft fix Your monitoring tool calls the Routine's API endpoint when an error threshold is crossed. Claude pulls the stack trace, correlates it with recent commits, and opens a draft PR with a proposed fix — before anyone is paged.
-
Deploy verification After each production deploy, your CD pipeline fires the Routine. Claude runs smoke checks against the new build, scans error logs for regressions, and posts a go/no-go verdict to the release channel.
-
Cross-language SDK porting A GitHub trigger fires on merged PRs in one SDK repo. Claude ports the change to a parallel SDK in another language and opens a matching PR — keeping multi-language libraries in lockstep automatically.
How to set up your first Routine
1. Choose your surface
Create and manage Routines from three places — all sync to the same cloud account:
- claude.ai/code/routines — the web interface, simplest for setup
- Claude Code Desktop app — integrated into the redesigned desktop client
- CLI —
claude routine createfor scripted setup in your workflow
2. Configure the Routine
Give it a name and write your prompt. Be specific: describe exactly what Claude should read, what decisions it should make, and what output it should produce. Good prompts for Routines look like SOPs — explicit conditions, explicit outputs.
# Example: nightly backlog triage prompt name: Nightly Issue Triage prompt: | Check all GitHub issues opened in the last 24 hours. For each issue: - Apply the most specific label from: bug, feature, docs, question, perf - Assign to the team member who owns the file area most referenced - If unclear, leave unassigned and add the 'needs-triage' label Post a summary to #dev-triage on Slack with counts by label. repos: my-org/my-repo connectors: [github, slack]
3. Add your trigger
For a Schedule trigger: pick a cadence (hourly / daily / weekly) and time. That's it.
For an API trigger: Anthropic provides an endpoint URL and a token. Send a POST with the anthropic-beta: experimental-cc-routine-2026-04-01 header and an optional input_text body to pass context (e.g. the alert payload) to Claude.
For a GitHub trigger: Select the event type (PR, push, issue, etc.) and install the Anthropic GitHub App on your repository. Note: /web-setup in the CLI only grants clone access — you must install the GitHub App separately for webhook events to reach Anthropic's infrastructure.
4. Scope your connectors
By default all your configured MCP connectors are included. Remove connectors the Routine doesn't need — this limits the access surface and reduces the chance of unintended side effects. A docs-drift Routine only needs GitHub and nothing else.
What this changes architecturally
Before Routines, running Claude Code autonomously required either keeping a terminal open on your machine or building custom infrastructure: a cloud VM, a cron scheduler, a secrets manager, and code to invoke the Claude API. That's a real engineering project.
Routines collapse that infrastructure to zero. The mental model shifts from "how do I run this agent in the cloud?" to "what should Claude do, and when?" — the same question you answer when writing the prompt in an interactive session.
| Before Routines | With Routines |
|---|---|
| Cloud VM or always-on laptop | Anthropic's infrastructure |
| Custom cron + orchestration code | Schedule trigger, no code |
| Webhook server + event routing | GitHub trigger + GitHub App |
| API glue code for every connector | MCP connectors, pre-configured |
| Manual secrets management | Connector auth handled by Claude Code |
Current limits and what to watch
Routines are a research preview — expect the product to evolve quickly. A few things to know going in:
- Daily run caps: Pro gets 5 runs/day, Max gets 15, Team/Enterprise gets 25. Plan your Routines accordingly — a nightly + weekly pair on Pro only needs 2 of your 5 daily slots on most days.
- GitHub App install is separate:
/web-setupin the CLI only grants repo clone access. For webhook-triggered GitHub Routines, you must manually install the Anthropic GitHub App on each repo. - Connector scoping: Review which connectors each Routine uses. Broad connector access on an automated agent is a larger blast radius than on an interactive session.
- Prompt engineering matters more: There's no human in the loop to catch a misread instruction. Write Routine prompts with the same care you'd give a production runbook.
The bigger picture
Routines represent a meaningful step in the evolution of AI tooling. The previous generation of AI productivity tools was synchronous — you send a message, you wait, you review, you act. Every step required a human in the loop.
Routines make a class of recurring development work genuinely autonomous. Not "AI that helps a developer" — AI that runs as part of the engineering system, like a CI pipeline or a deployment job. The output of a Routine is commits, PRs, labels, Slack messages — artifacts that land in the same places that human-generated work lands.
For engineering teams that adopt this seriously, the practical result is a reduction in the volume of routine cognitive tasks: triage, doc maintenance, regression checks, boilerplate reviews. Those hours stack up. A team of five running well-designed Routines recovers time that compounds over months.
Want to set up Routines for your team?
We design and implement Claude Code automation workflows — from the first Routine to a full AI-augmented engineering pipeline.
Talk to us →