AI Codex
Claude CodeHow It Works

Claude Code Routines: automations that run without you

In brief

Routines let you configure a Claude Code task once — a nightly bug triage, a PR review on every push, an alert fix triggered by your monitoring system — and have it run in the cloud on its own schedule. Here's how they work and what they're useful for.

6 min read·AI Agent

Contents

Sign in to save

Routines are Claude Code automations you configure once and leave running. They exist on Anthropic's infrastructure, not your machine — so they keep running when your laptop is closed, your terminal is gone, or no one is logged in.

They were announced April 14, 2026, and are available to Pro, Max, Team, and Enterprise users with Claude Code on the web enabled.

Three ways to trigger a routine

Scheduled

You give Claude a task and a cadence. It runs on that schedule, unattended.

Example: every night at 2am, pull the highest-priority open bug from Linear, attempt a fix, and open a draft PR. You wake up to something to review rather than an empty inbox.

API-triggered

Each routine gets its own endpoint and auth token. POST a message to that URL and the routine executes.

This lets external systems kick off Claude Code sessions. Useful for: your monitoring system detecting a production anomaly and triggering a diagnostic routine, a deployment hook running a post-deploy check, an internal tool spinning up a Claude Code session from a Slack command.

Webhook-based (GitHub events)

You subscribe a routine to a repository event — PR opened, commit pushed, review comment added. Claude creates a session per matching event and responds to it continuously.

Example: subscribe a security review routine to pull request creation. Every new PR gets a Claude Code session that checks for common security issues, comments its findings, and tracks CI failures until they're resolved. The routine feeds updated context as the PR evolves.

Daily limits

Routines run against your plan's daily allowance:

Plan Routines per day
Pro 5
Max 15
Team 25
Enterprise 25

Additional routine capacity is available for purchase beyond these limits.

What routines are good for

The four use cases Anthropic highlights at launch:

Backlog management. Automated issue triage: pull new issues, categorize them, assign labels, post a Slack summary of the day's additions. Frees up the meeting you'd otherwise spend reviewing the backlog.

Alert triage. Connect to Datadog or your alerting system. When a threshold fires, the routine starts a session: reads the alert, looks at recent code changes, produces a draft fix or a diagnosis note. By the time someone picks it up, context is already assembled.

Code review. Run a review routine on every PR — security scan, performance check, dependency audit. The human reviewer sees Claude's notes alongside the diff.

Library porting. If you maintain an SDK in multiple languages, a routine can sync changes from the primary implementation to secondary ones automatically.

How this differs from hooks

Claude Code hooks (configured in settings.json) run locally in your terminal session, triggered by specific Claude actions — tool calls, session stop, permission requests. They run on your machine while Claude Code is running.

Routines are cloud-based and event-driven at a higher level. They spin up a full Claude Code session on Anthropic's infrastructure in response to a schedule, an API call, or a repository event. You don't need to be at your computer.

The mental model: hooks customize what happens inside a session you're running. Routines schedule sessions to run without you.

Setting up a routine

Routines are configured through Claude Code on the web (claude.ai/code). You specify:

  • A prompt describing what Claude should do
  • The repository to work in
  • Any connectors (Linear, GitHub, Slack, etc.)
  • The trigger: schedule expression, API endpoint, or GitHub event

Once configured, you get an endpoint URL and auth token for API-triggered routines, or the scheduled run starts automatically.

The Claude Code session Claude creates for each routine run has full access to the tools and connectors you configured — the same capabilities as an interactive session, just unattended.

Official docs

Full reference: platform.claude.com/docs/en/claude-code/routines

Announcement post: claude.com/blog/introducing-routines-in-claude-code

Related tools

Weekly brief

For people actually using Claude at work.

Each week: one thing Claude can do in your work that most people haven't figured out yet — plus the failure modes to avoid. No tutorials. No hype.

No spam. Unsubscribe anytime.

What to read next

All articles →