Claude Code routines: automate workflows on a schedule
In brief
A routine is a Claude Code automation that runs on a schedule, from an API call, or in response to a GitHub event — without your laptop open. Here's what they are and where they fit best.
Contents
A Claude Code routine is an automation you configure once — a prompt, a repo, and any connectors — and then run on a schedule, via an HTTP call, or in response to a GitHub event. Routines run on Anthropic's infrastructure, not your local machine.
The feature launched in research preview on April 14 2026. It is available on Pro, Max, Team, and Enterprise plans with Claude Code enabled.
How to create one
Go to claude.ai/code/routines to create and manage routines. You can also use /schedule from the CLI.
A routine has three parts:
- The task prompt — what Claude should do each time the routine runs
- The repo — which repository it has access to
- The trigger — when and how it fires
Trigger types
Scheduled — runs on a recurring cadence using standard cron syntax: hourly, nightly, weekly, or any other interval.
API — Anthropic generates a per-routine endpoint. Send an HTTP POST with a bearer token to trigger the routine from another system — a CI pipeline, a monitoring alert, or a webhook from your issue tracker.
GitHub events — attach to repository events like pull request opened, merged, or closed. The routine fires automatically when the event occurs.
Daily run limits
| Plan | Daily runs |
|---|---|
| Pro | 5 |
| Max | 15 |
| Team / Enterprise | 25 |
What to automate with routines
Nightly issue triage. Claude scans new GitHub issues, labels them by type, assigns based on code area, and posts a summary to Slack. You start each morning with a clean backlog instead of raw notifications.
Docs drift detection. Claude runs weekly, scans PRs merged since the last run, identifies functions or APIs that changed, and opens update PRs for the docs files that reference them.
Deploy verification. Your CD pipeline POSTs to the routine's API endpoint after each deploy. Claude checks the build, reads error logs, and posts a go/no-go to your release channel before on-call reviews anything.
Alert triage. Point Datadog at the routine's API endpoint. When an alert fires, Claude pulls the trace, correlates it with recent deployments, and has a draft fix ready before the on-call engineer opens the page.
Feedback resolution. Claude scans incoming product feedback on a cadence, categorizes it, and opens issues for patterns that appear more than a threshold number of times.
What routines are not
Routines are not a CI/CD replacement. They run with the same repo permissions as your existing Claude Code setup — not with production credentials. They are best for reasoning tasks: reading, summarizing, triaging, flagging, and drafting. Tasks that require deploying code or modifying production systems need separate authorization.
For long one-off tasks, a standard Claude Code session is still the right tool. Routines fit recurring patterns.
Getting started
- Enable Claude Code on your account (requires Pro or above)
- Go to claude.ai/code/routines
- Click "New routine," connect a repo, write a task prompt, and set a trigger
- Test it by running it manually before setting the live schedule
Start narrow: one repo, one clear task, one output channel. Add complexity once the basic pattern is running reliably.
Official announcement: claude.com/blog/introducing-routines-in-claude-code