Claude Code Routines, a new feature in research preview, enables developers to save and automate Claude Code configurations for recurring tasks on Anthropic-managed cloud infrastructure. The feature packages a prompt, one or more repositories, and a set of connectors into a single saved configuration that runs automatically based on defined triggers.

Routines execute on cloud infrastructure, allowing tasks to continue running even when a developer’s laptop is closed. Each routine can have one or more triggers attached: scheduled runs on recurring cadences such as hourly, nightly, or weekly; API triggers that start runs on demand via HTTP POST requests; or GitHub triggers that activate automatically in response to repository events like pull requests, pushes, issues, or workflow runs.

How Claude Code Routines Work

A Claude Code routine operates as a saved configuration combining a prompt, repositories, and connectors. When a trigger matches, the routine executes as a full cloud session without requiring approval prompts or permission-mode selection. The session can run shell commands, use skills from the cloned repository, and call any included connectors.

Access to resources is determined by the selected repositories, their branch-push settings, the environment’s network access and variables, and the included connectors. Developers can scope each element to what the routine actually needs. Routines belong to individual claude.ai accounts and are not shared with teammates. All actions performed by a routine appear under the creator’s identity, with commits and pull requests carrying the GitHub user and connector actions using linked accounts.

Trigger Types and Configuration

Schedule triggers run routines on recurring cadences. Times are entered in local timezone and converted automatically, ensuring the routine runs at the specified wall-clock time regardless of cloud infrastructure location. Runs may start a few minutes after the scheduled time due to stagger, though the offset remains consistent for each routine. Custom intervals such as every two hours or the first of each month can be set using cron expressions via the CLI, with a minimum interval of one hour.

API triggers provide a dedicated HTTP endpoint for on-demand execution. Sending an authenticated POST request to the endpoint starts a new session and returns a session URL. This integration method suits alerting systems, deploy pipelines, and internal tools. Each routine has its own bearer token scoped to triggering that routine only. Tokens can be regenerated or revoked from the routine’s edit form.

GitHub triggers start new sessions automatically when matching events occur on connected repositories. Supported events include pull requests, pull request reviews, pushes, releases, issues, issue comments, discussions, check runs, workflow runs, and repository dispatch events. Developers can filter pull requests by author, title, body, base branch, head branch, labels, draft status, merge status, and fork origin. Each matching event starts its own independent session.

Creating and Managing Routines

Routines can be created from the web at claude.ai/code/routines, from the CLI using the /schedule command, or from the Desktop app by selecting New remote task. The creation form collects the routine’s prompt, repositories, environment, connectors, and triggers. The prompt is the most critical element since the routine runs autonomously and must be self-contained with explicit instructions about what to do and what success looks like.

From the routine detail page, developers can click Run now to start a run immediately without waiting for the next scheduled time. The toggle in the Repeats section pauses or resumes the schedule while keeping configuration intact. The pencil icon opens Edit routine to change the name, prompt, repositories, environment, connectors, or any triggers. Clicking the delete icon removes the routine, though past sessions created by the routine remain in the session list.

Availability and Usage Limits

Claude Code Routines are available on Pro, Max, Team, and Enterprise plans with Claude Code on the web enabled. Routines draw down subscription usage the same way interactive sessions do. In addition to standard subscription limits, routines have a daily cap on how many runs can start per account. Current consumption and remaining daily routine runs are visible at claude.ai/code/routines or claude.ai/settings/usage.

When a routine hits the daily cap or subscription usage limit, organizations with extra usage enabled can continue running routines on metered overage. Without extra usage, additional runs are rejected until the window resets. Extra usage can be enabled from Settings > Billing on claude.ai. During the research preview, GitHub webhook events are subject to per-routine and per-account hourly caps, with events beyond the limit dropped until the window resets.

Use Cases and Applications

Backlog maintenance routines run nightly against issue trackers via connectors, reading issues opened since the last run, applying labels, assigning owners based on code areas, and posting summaries to Slack. Alert triage routines receive monitoring tool calls via API endpoints, pull stack traces, correlate them with recent commits, and open draft pull requests with proposed fixes. Code review routines apply team checklists on pull_request.opened events, leaving inline comments for security, performance, and style issues.

Deploy verification routines run after production deployments via API endpoints, executing smoke checks against new builds, scanning error logs for regressions, and posting go or no-go decisions to release channels. Documentation drift routines scan merged pull requests weekly, flag documentation referencing changed APIs, and open update pull requests for editor review. Library port routines run on pull_request.closed events filtered to merged PRs, porting changes to parallel SDKs in other languages and opening matching pull requests.