Routines — automated Claude Code workflows
Autonomous routines in Claude Code triggered by schedules, API calls, and GitHub events. Run code review, bug fixes, and deploy verification from the cloud — laptop closed.
This article is a summary based on official documentation.
Overview
Claude Code introduces Routines: set-and-forget workflows that run autonomously on schedules, API calls, or GitHub events. They run on Anthropic cloud infrastructure, so your laptop doesn’t need to be on. Use them to automate code review, bug fixes, deploy verification, doc updates, and other recurring work.
Research Preview. Behavior and limits may change.
Features
-
3 trigger types — combine multiple triggers on one routine. E.g. run a PR review routine every night on a schedule and on every new PR via GitHub events.
Trigger Description Example Schedule Recurring by hour/day/week Every night at 2am, attempt fixes for top Linear bugs and open draft PRs API HTTP POST to invoke on demand After deploy pipeline completes, run smoke tests GitHub Reacts to repo events (PR, push, issue, etc.) On PR open, auto-review against security/perf/style checklist -
Cloud autonomous execution — runs on Anthropic-managed infrastructure. Shell commands, skills, and MCP connectors (Slack, Linear, Google Drive, etc.) all work. Each run creates an isolated session you can open in the browser and continue the conversation from.
-
Granular GitHub events — 17 event categories (PR, push, issue, release, workflow run, etc.). PR triggers can filter by author, title, branch, labels, draft status.
-
API triggers — each routine gets a unique HTTPS endpoint and Bearer token. Invoke from monitoring systems, CI/CD, or internal tools. Pass alert content or logs via the
textfield.
How to create
| Method | Description |
|---|---|
| Web | Create/manage at claude.ai/code/routines |
| CLI | /schedule for interactive creation (schedule trigger only) |
| Desktop | New task → New remote task |
CLI-created routines are visible and editable in the web UI. API and GitHub triggers require the web UI.
Example use cases
- Backlog maintenance — nightly scan of issue tracker, label + assign, post Slack summary
- Alert response — on a monitoring alert, analyze stack trace and open a fix PR
- Code review — on PR open, inline comments against a team checklist
- Deploy verification — after prod deploy, run smoke tests, scan error logs, emit go/no-go
- Doc sync — weekly scan of merged PRs, open doc-update PRs for API changes
- Library port — when a PR merges in the SDK repo, auto-open porting PRs in other language SDKs
Limits
Routines consume the same subscription usage as normal sessions, plus a per-day run limit.
| Plan | Daily routine runs |
|---|---|
| Pro | 5 |
| Max | 15 |
| Team / Enterprise | 25 |
Organizations with extra usage enabled can keep running past the limit on a metered basis; otherwise routines queue until the next day.
Notes
- Routines are scoped to personal accounts. They’re not shared with teammates — commits, PRs, and Slack messages show up under your account.
- By default, pushes are restricted to branches with a
claude/prefix. Enable “Allow unrestricted branch pushes” in routine settings to push to others. - See the official docs for detailed configuration.
Frequently Asked Questions
What are Routines?
Claude Code's automation feature: configure once and the routine runs on schedules, API calls, or GitHub events. They run on Anthropic-managed cloud infrastructure, so they execute even when your laptop is closed — handling code reviews, bug fixes, deploy verification, doc updates, and similar repeatable work.
Which triggers are supported?
Schedule (recurring time-of-day/week), API (HTTP POST to run on demand), and GitHub (17 event categories — PRs, pushes, issues, etc.). A single routine can combine multiple triggers.
How do I create one?
Create and manage on the web at [claude.ai/code/routines](https://claude.ai/code/routines), via the `/schedule` slash command in the CLI (schedule triggers only), or in Claude Desktop via New task → New remote task.
What are the usage limits?
Daily routine-run limits: Pro 5, Max 15, Team/Enterprise 25. Orgs with extra usage enabled can continue beyond the limit on a pay-as-you-go basis.
Are routines shared with my team?
Routines are tied to your personal account — not shared with teammates. Commits, PRs, and Slack messages a routine performs appear under your account.
Where are the official docs?
Announcement: claude.com/blog/introducing-routines-in-claude-code. Docs: code.claude.com/docs/en/routines