AI Catchup

Claude Code Routines: Schedule, API, and GitHub-Trigger Your AI Agents

Claude Code Routines is Anthropic's new way to run saved Claude Code configurations automatically -- by schedule, API call, or GitHub event. Routines run on Anthropic's cloud infrastructure with a prompt, repo, and MCP connectors. Available in research preview on Pro, Max, Team, and Enterprise plans.

Claude Code Routines: Schedule, API, and GitHub-Trigger Your AI Agents

Anthropic shipped Claude Code Routines on April 14, 2026, turning Claude Code from a session you start into a background agent that fires on its own. A Routine is a saved configuration -- a prompt, one or more repos, and a set of MCP connectors -- that runs on Anthropic's cloud whenever a schedule, an HTTP call, or a GitHub event triggers it. The launch lands as a research preview on Pro, Max, Team, and Enterprise plans, with daily run caps and a beta API header that signals breaking changes are still expected.

Key Takeaways

  • Routines = saved prompt + repos + MCP connectors + trigger
  • Three trigger types: cron schedule, HTTP API endpoint with bearer token, GitHub events (PR, push, releases, issues)
  • Runs on Anthropic web infrastructure -- no laptop required
  • Stateless: every detail must live in the prompt; no memory between runs
  • Daily caps by plan: Pro 5, Max 15, Team/Enterprise 25 routine runs per day

What Is a Claude Code Routine?

A Routine is a packaged Claude Code session you do not have to babysit. Anthropic's framing in the official docs is precise: a saved Claude Code configuration -- a prompt, one or more repositories, and a set of connectors -- packaged once and run automatically. You build it once, point it at a trigger, and Claude does the work in the cloud whenever that trigger fires.

The four ingredients are simple. You give the Routine a prompt that explains the job in plain language. You attach the GitHub repos the prompt should read or write to. You wire in the MCP connectors the prompt will need at runtime -- Slack to post summaries, Linear to file tickets, Asana to update tasks, Google Drive to drop reports, or any of the MCP servers worth plugging into a Routine today. Finally, you pick a trigger that decides when to run it.

The runtime is Claude Code on the web, not your local CLI. That matters: the Routine is not bound to your laptop being open. You can shut your machine and the 3am stale-PR sweep still runs. When you reopen the desktop app you see past sessions in the sidebar, ready to inspect -- a flow described in more detail in the recent Claude desktop redesign coverage.

The Three Ways to Trigger a Routine

A Routine can subscribe to one trigger or all three at the same time. The right choice depends on what kicks the work off in the real world.

Schedule trigger. Use this for cadenced work that does not need to react to anything specific. The web UI offers preset cadences -- hourly, daily, nightly, weekdays, weekly -- and the CLI exposes the full control surface via /schedule update, where you can supply a custom cron string. The minimum interval is 1 hour, so sub-hourly polling is off the table.

HTTP API trigger. Each Routine ships with a unique HTTPS endpoint and a bearer token. Anything that can POST to a URL can fire it: a release script, a Stripe webhook, a Vercel deploy hook, a one-line shell alias. The request can carry an optional text payload, which Claude reads as additional context. The endpoint is gated by a dated beta header, experimental-cc-routine-2026-04-01. The header is dated, which is the conventional Anthropic pattern for signaling that the spec will change; expect a migration window for breaking revisions.

GitHub event trigger. A Routine can subscribe to pull_request.opened, push, issues, releases, check_runs, and discussions. A single Routine can listen to several of these at once, which makes it possible to write one "PR shepherd" Routine that runs on opens, pushes, and check completions for the same repo. The trigger requires the Claude GitHub App installed on the target repository.

Setting Up Your First Routine

The fastest path is the web UI at claude.ai/code/routines -- it walks you through trigger selection, repo selection, and connector permissions in a single flow. The Claude desktop app and Claude Code CLI work too, with the CLI exposing finer-grained controls via /schedule update.

The minimum viable Routine takes four steps. First, write the prompt as if you were briefing a teammate who has never seen the project -- because the Routine is stateless, every detail you assume the model "remembers" from a past conversation has to be in the prompt itself. Second, attach the GitHub repos. More repos means more context to load on every run, so scope tight. Third, enable the MCP connectors the prompt will reference and grant the OAuth scopes they ask for. Fourth, pick the trigger and save.

Once it is live, you can fire a Routine on demand from the web UI to test it before the trigger takes over. For schedule changes, run /schedule update inside an attached Claude Code session to edit the cron string, swap a preset, or pause the Routine without leaving the CLI. Past runs stream into the desktop app's session sidebar, so you can scroll through what Claude did and what it returned, the same way you inspect any other Claude Code conversation.

Five Practical Routines Worth Building This Week

Anthropic's launch post highlighted four use cases -- verifying deployments, triaging alerts, maintaining docs, and proposing code changes for human review -- and the community on day one was already building variants of all four. Here are five concrete Routines a developer can configure today.

1. Nightly stale-PR sweep. Schedule a Routine to fire at 3am local time. Wire in the GitHub and Slack MCP connectors, scope it to your main repo, and prompt it to list every open PR last updated more than 7 days ago, group by author, and post the digest to #engineering. The team sees the list at standup instead of letting old PRs rot.

2. Auto-triage new GitHub issues. Trigger on issues.opened. Use just the GitHub MCP. Prompt the Routine to read the issue body, classify the area (frontend, API, infra, docs), apply the matching label, assign the right owner, and post a comment requesting any missing repro steps if the issue is too thin to act on. Frees the on-call from triaging the queue at 9am.

3. Docs sync on push. Trigger on push to main. Scope it to the repo. Prompt the Routine to diff the recent changes against the README, identify any drift between exported APIs and what the docs claim, and -- if there is drift -- open a PR with proposed updates. The PR still requires a human review and merge, which is the point: the Routine surfaces the gap, your team decides what ships.

4. Hourly deploy verification. Schedule it hourly. Attach GitHub and Slack (or the MCP for whichever CI platform you use). Prompt it to read the latest CI run, summarize pass and fail counts, list any new failures with the failing test name, and post the digest to #deploys. This is the deployment-verification example Anthropic called out, scoped tight enough to fit comfortably under the daily caps.

5. Webhook-driven release notes. Trigger via the HTTP API endpoint, called from your release script's last step. Scope to the repo. Prompt it to read every commit since the last tag, group changes by area, write user-facing release notes in your house style, and append the result to CHANGELOG.md via a PR. One curl command at the end of the release script and the notes write themselves.

Routines is not the only tool offering scheduled-and-triggered AI sessions. The comparison with Cursor Automations walks through how each major platform approaches the same five jobs.

What Routines Cannot Do Yet

A research preview is a research preview, and Anthropic was direct about the gaps.

The biggest one is the stateless model. There is no memory between runs. If a Routine ran 10 minutes ago and learned a project convention, the next run starts from scratch. Anything you want it to "know" has to live in the prompt, the repo, or a connector the prompt explicitly queries.

The 1-hour minimum schedule interval rules out sub-hour polling, and the daily caps will bite you if you wire a Routine to a noisy GitHub trigger -- subscribing to push on a busy monorepo can blow through 25 runs before lunch. The fix is to filter the trigger or move the work to a schedule-driven Routine that runs once a day on the rolled-up state.

Code changes still require human review. A Routine can open a PR, but it cannot merge one. That is intentional: Anthropic is shipping autonomous triggers, not autonomous deployments. The shape matches the broader pattern in the 2026 AI tools landscape so far, where the leading tools are betting on supervised autonomy over full autopilot.

The HTTP API uses a dated beta header today. The spec will change. Plan for at least one migration window in the next 6 months when the header revises. Routines also requires a paid Claude plan with Claude Code on the web enabled -- no free tier, no API-credit-only path.

Pricing and Daily Caps

Routines is bundled into existing Claude paid plans, with a hard daily cap on the number of Routine runs each plan allows.

| Plan | Daily Routine runs | | --- | --- | | Pro | 5 | | Max | 15 | | Team | 25 | | Enterprise | 25 |

Behavior above the cap depends on your plan; consult your account's billing page before wiring a Routine to a noisy trigger. Caps reset daily; check the Routines dashboard for the exact reset time on your account. The feature is tied to subscriptions because it consumes Anthropic-side compute on a schedule the user does not directly control.

The practical implication is that you should treat Routine runs as a budget, not as an always-on resource. A team on Max gets 15 runs per day, which sounds generous until a Routine fires on every push. Both the Anthropic launch post and Noah Zweben's follow-up notes make this point explicitly. Teams making Routines work on day one are picking 2-4 high-value Routines per repo, scoping triggers tightly, and leaning on schedule-driven runs over event-driven ones for anything that does not need real-time response. Start with one Routine, watch what it costs over a week, and add the next one only once you understand the budget shape.

Frequently Asked Questions

How is Claude Code Routines different from GitHub Actions?

GitHub Actions runs deterministic workflows you script step by step. A Routine is a single Claude Code session triggered the same way, but it reasons about the repo and connectors using a natural-language prompt. You write intent, not YAML, and Claude decides which tools to call. Use Actions for compile/test/deploy and Routines for judgment-heavy work like triage and docs sync.

Can I trigger a Routine from an existing CI/CD pipeline?

Yes. Each Routine ships with a unique HTTP endpoint and bearer token, so any pipeline that can POST to a URL can fire it. Add a curl step to your release script to generate release notes, or call the endpoint from a GitHub Action to chain a Routine after deploy. Optional text payloads pass extra context.

What happens if a Routine hits the daily cap mid-run?

An in-progress Routine completes once it has started, so a single run will not be cut off by the cap. Behavior above the cap depends on your plan: some plans queue, some reject, some bill an overage. Pro gets 5 runs per day, Max 15, Team and Enterprise 25. Upgrade or filter noisy triggers to stay within budget.

Get the weekly AI Catchup

Tools, practices, and what matters -- in your inbox every Monday.