Claude Code & coding agents

Claude Code Routines: how they work and where the limits are

A routine is a saved Claude Code task that runs in the cloud on a schedule, from an API call or on GitHub events. How to set one up and where the limits are.

Erik van de Blaak
Erik van de Blaak · updated
10 min read • 1,265 views
Claude Code Routines: how they work and where the limits are

An automation in Zapier or n8n does exactly what you drew: when A happens, do B. If a customer phrases a question slightly differently than you expected, the flow goes the wrong way. Claude Code Routines turn that around. You give Claude a goal and the means, and it works out how to get there itself, even when your laptop is closed.

Anthropic introduced routines on 14 April 2026 as a research preview. They are now called scheduled tasks; the old name still shows up in the app, the web address and the CLI. This article explains how they work, how to set one up and where the limits are.

Updated on 5 November 2026. A lot has changed since September: the new name, limits per hour instead of per day, runs that start in auto mode, the Ultra plan and GitHub issues as a trigger. All facts come from Anthropic's documentation; the sources are listed at the end.

In short. A routine (now: scheduled task) is a saved Claude Code job that runs on its own in Anthropic's cloud: on a schedule, through an API call or on a GitHub event. It is available on Pro, Max, Ultra, Team and Enterprise. The limits are per hour: 100 scheduled runs per account, and 30 manual or API starts per routine. On top of that, every run uses your regular subscription usage.

What are Claude Code Routines?

A routine is a saved Claude Code configuration: a prompt, one or more GitHub repositories and a set of connectors. You set it up once, and from then on it runs automatically on Anthropic's cloud infrastructure, or on your organisation's own environment if it is set up that way. Every run is a full Claude Code session that you can read back afterwards.

Routines are available on the Pro, Max, Ultra, Team and Enterprise plans. They belong to your personal account: colleagues don't see them, and runs count towards your limits. You manage them at claude.ai/code/routines, in the desktop app under Scheduled, or from the CLI with /schedule (the old name /routines also works). /schedule requires a claude.ai subscription login; with only an API key the command doesn't appear.

The alarm clock, the doorbell and the pull request

A routine starts through a trigger. There are three, and you can combine them.

Schedule: the alarm clock

The routine runs at a set time, at a preset frequency such as hourly, daily or weekly. For anything else, such as every two hours, choose Custom and enter a cron expression; from the CLI, use /schedule update. Nothing more frequent than once an hour is allowed. Mind the time zone: a bare cron expression is in UTC, so 0 9 * * 1-5 runs on weekdays at 9:00 UTC. A one-off run at a specific time is also possible, for example "in two weeks, clean up the feature flag".

API: the doorbell

Each routine can get its own HTTP endpoint with a bearer token. Another system (your monitoring, a deploy script, a form via n8n) sends a POST request and the routine starts. In the text field you can pass context, such as the body of an alert, up to 65,536 characters.

That text does not arrive as a regular instruction. Claude receives it wrapped in a <routine-fire-payload> block that marks it as untrusted data. Claude does not follow instructions inside it unless the routine's own prompt refers to it. So write something explicit like "Answer the request in the routine-fire-payload block", or the text you send stays inert context.

GitHub: the pull request and the issue

The routine reacts to events in a repository, in three categories: pull requests, releases and, new since September, issues (opened, edited, closed, labelled, assigned). Filters on author, title, description, base and head branch, labels, draft status and whether the pull request was merged decide which event starts a run. This requires the Claude GitHub App on the repository. A run started by a pull request begins at that pull request's latest commit instead of the default branch.

How is this different from Zapier, Make or n8n?

Those tools run a fixed flow. A routine gets a goal and decides for itself which steps are needed: reading files, running commands, calling connectors. That makes it better suited to work where the input is messy and you cannot map out every case in advance.

They are not mutually exclusive. An n8n flow can catch the form and start a routine through the API endpoint to do the thinking. The fixed flow handles transport, the routine the content.

Setting up your first routine

  1. Name, prompt and model. Go to claude.ai/code/routines and create a new task (in some accounts the button still says New routine). In the desktop app, click Scheduled and choose Cloud; Local creates a scheduled task that runs on your own computer. In the prompt field, choose the model and effort level each run uses.
  2. Repositories. Add the GitHub repositories Claude works in. Every run clones them fresh and starts on the default branch, unless your prompt says otherwise. A repository is also a good place for context that several routines share, such as a style guide or price list: update the file and the next run reads the new version.
  3. Environment. The default environment has network access set to Trusted: only an allowlist of package registries, cloud APIs and the like. If the routine needs to read arbitrary websites, set network access to Custom with your own domains, or to Full. Connectors run through Anthropic's servers and don't need this change.
  4. Trigger. Choose a schedule, a GitHub event or API. You only get the API token after the routine has been saved, and you only see it once.
  5. Connectors. By default all your connected connectors are included. Remove the ones the routine doesn't need.
  6. Test. Save and click Run now. Open the session and read what Claude did.

Once set up, an API call looks like this according to the documentation (routine ID and token are placeholders):

curl -X POST https://api.anthropic.com/v1/claude_code/routines/trig_.../fire \
  -H "Authorization: Bearer sk-ant-oat01-..." \
  -H "anthropic-beta: experimental-cc-routine-2026-04-01" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"text": "New request via the contact form: ..."}'

The path, the beta header and the routine-fire-payload tag keep the old name. When a limit is reached, the endpoint answers with 429 and a Retry-After header; a script that calls the routine has to handle that.

A prompt that works without you

A routine cannot quickly check with you. The prompt therefore has to contain everything a new colleague would need while you are unreachable. Five parts help:

  • Role: "You handle new requests from the contact form."
  • Goal: "Write a personal reply to the request in the routine-fire-payload block."
  • Steps: "Read the request, look up the sender's company, use the price list in docs/prices.md."
  • Output: "Save the reply as a draft in Gmail and post a link in #sales."
  • Limits: "Never send an email yourself. Make no price commitments outside the price list."

Safety: auto mode, and everything happens as you

A run in Anthropic's cloud starts in auto mode, unless it is unavailable. A classifier model then judges every action that would otherwise wait for your approval. Ordinary actions go ahead, risky ones are blocked. That means a run is no longer fully unattended: when an action matches an ask rule, or the classifier keeps blocking something, a permission prompt appears in the session and the run waits until someone answers.

Everything does happen as you: commits and pull requests carry your GitHub name, Slack messages come from your account. A few rules of thumb follow. Have emails and messages prepared as drafts, so a person sends them. Limit connectors to what is needed. Code changes go to branches prefixed with claude/ by default. Which branches a run may push to is something you control with branch protection or rulesets on GitHub; a rule your account is allowed to bypass doesn't stop the run.

Also watch the status of a run. Succeeded means the session ended without Claude Code reporting a failure, not that the task worked. A blocked network request, a missing connector or work Claude couldn't finish only shows up in the transcript. If your GitHub connection has expired, the routine skips runs; after 72 hours without a connection it turns off.

What does it cost, and how many runs can you do?

Routines use your regular subscription usage, just like interactive sessions. On top of that there are hourly limits, the same for every plan:

WhatLimitApplies to
Scheduled runs, one-off runs included100 per houryour account; the run waits until the limit frees up
Run now, API calls and re-running a one-off task30 per houreach routine, one count for all three
Run now and re-running a one-off task100 per houryour account
API calls100 per houryour account, separate from Run now
GitHub eventshourly cap per routine and per account (no number published)events above the limit are dropped

There is no paid extension for these hourly limits. When your subscription usage runs out, organisations with usage credits can keep going at metered rates; without usage credits, extra runs are rejected until your usage window resets. How long a single run may take is not documented, nor how many cloud sessions an organisation may run at once, although that limit does exist.

At the April launch these were daily limits: 5 runs a day for Pro, 15 for Max and 25 for Team and Enterprise. Those are gone. In practice that matters a lot. A routine that reacts to every submitted contact form used to hit its ceiling on Pro after five requests; now it can start 30 times an hour through the API. The real limit is now more likely your subscription usage: every run is a full session that costs tokens. A routine on every incoming email in info@ therefore remains a sum you need to do first.

Which tasks suit a routine?

Good fits are tasks that can run unsupervised and have a checkable result. Anthropic mainly mentions development work: labelling and assigning new issues overnight, investigating an alert and opening a draft pull request with a fix, running every new pull request past your own review checklist, checking the logs after a deploy.

Outside software development the same patterns work, as long as the systems involved are reachable as a connector or through the API endpoint. Think of a morning overview of calendar and email in Slack, a weekly summary of support tickets, or a weekly check of competitors' websites (with wider network access). A draft reply to a negative review or a polite reminder for an overdue invoice also works, if the system where that event happens can send an HTTP request.

Start with one routine that writes drafts

Pick one recurring task you now do yourself every week, have the routine prepare the result as a draft, and read every transcript in the first week. That shows you where the prompt is unclear before a mistake gets repeated every day without anyone noticing. If you don't use Claude Code yet, start with the installation and a first session.

As of 5 November 2026. Scheduled tasks are still a research preview; behaviour, limits and the API may change.

Further reading on this site

Sources

Share this article

Erik van de Blaak

Written by

Erik van de Blaak

AI Solutions Engineer & Full-Stack Developer

Erik van de Blaak is an AI Solutions Engineer and full-stack developer at CareerValue BV. Here he writes about AI coding tools and agents, such as Claude Code.

Comments (0)

Comment on this article

Never published

I read every comment before it goes online.

No comments on this article yet.