Tool
Claude Code (routines)
Price
Included in Pro, Max, Team and Enterprise
Time
15 min
Level
Beginner, GitHub account

On Monday morning you open your tools one by one to see what moved: tickets, tracking files, pending requests. Then you write the same summary as last week. That is exactly the kind of work a routine takes off your hands. The feature carries this name in Anthropic's official documentation, with one important caveat: it is a research preview, so its behaviour and limits may still change.

What it does, and who it is for

A routine is a Claude Code configuration saved once: a prompt, one or more GitHub repositories (online folders, cloned on every run) and the connectors on your Claude account (Slack, Linear, Google Drive…). It starts in three ways:

  • On a schedule: hourly, daily, on weekdays, weekly, or once at a specific time.
  • Through an API call: another tool (a form, an alert) fires it with a URL and a secret token.
  • On a GitHub event: a pull request opened, a release published.

It suits a freelancer or a small team who already pays for Claude and has a recurring reading-and-summarising task: weekly update, request triage, document review, monitoring.

Routine, local task or /loop: which one

  • Routine (cloud): runs at Anthropic, even with your laptop closed. No access to your local files, only to a fresh copy of the repository. Minimum interval: one hour.
  • Local scheduled task (Claude Desktop app, Code tab, Routines, New routine, Local): reads your files, but only fires while the app is open and the computer awake. A missed run is caught up once when the computer wakes.
  • /loop: repeats a prompt inside an open session, to watch something for a few hours. It stops with the session and expires after seven days.

Create your first routine

  1. Open the formGo to claude.ai/code/routines and click New routine. From the terminal, the /schedule command does the same thing as a conversation: Claude asks the questions one by one.
    Claude Code
    /schedule every Monday at 8:07am, prepare the weekly update from tracking/projects.md
  2. Write a self-contained promptNobody will be there to answer questions: the prompt must say what to do, where to write the result and what is off limits. A template to adapt:
    Routine prompt
    You prepare the company's weekly update. Answer in English.
    1. Read tracking/projects.md in the repository and the open tickets in Linear.
    2. Write a summary of 10 lines at most: what is late, what is blocked,
       what must ship this week.
    3. Save it to updates/YYYY-MM-DD.md (today's date).
    4. Do not send any message, do not edit or close any ticket.
    5. If information is missing, write [TO CHECK] instead of guessing.
  3. Pick the repositoryClaude clones it on every run and pushes its changes to a branch whose name starts with claude/. A private repository holding your tracking files is enough.
  4. Keep the default environmentThe “Default” environment limits internet access to a list of common domains. Connectors go through Anthropic's servers and work without extra setup.
  5. Choose the triggerUnder Select a trigger, pick Schedule, then “Weekly” or “Weekdays”. The time is entered in your own time zone. A tip from the docs: aim for 8:07 rather than 8:00, as a run set exactly on the hour can start a few minutes late.
  6. Remove unneeded connectorsAll your connectors are included by default, and Claude can use every one of their tools without asking, including writes. Keep only the ones the task needs.
  7. Test it right awayClick Create, then Run now. Open the session it creates and read what Claude did. A green status only means the session started and ended without an infrastructure error, not that the task succeeded.

Useful settings

  • Language. State the language and the expected format (dates, length) in the prompt. The routine has nothing else to go on.
  • Model. The prompt field includes a model picker, used on every run.
  • A custom interval. For “every two hours” or “the 1st of the month”, pick the closest preset, then run /schedule update in the terminal.
  • Just once. /schedule accepts a plain-language time (“tomorrow at 9am”). Claude confirms the exact timestamp, and the routine disables itself after it fires.
  • Pause and follow-up. A switch pauses the routine without deleting it. /schedule list lists them, /schedule run starts one immediately.

Cost and limits

  • A routine draws on your subscription like a normal session. Track your usage at claude.ai/settings/usage.
  • On top of that come hourly caps: 100 scheduled runs per hour per account, 30 manual or API starts per hour per routine.
  • /schedule needs a claude.ai login: it does not appear if you use an API key.
  • If your GitHub connection expires, runs are skipped for up to 72 hours, then the routine turns off.
  • Routines belong to your account and are not shared with your team.

Be careful. During a run, no window asks for your permission: Claude runs commands and uses connectors on its own. Everything it does through GitHub, Slack or Linear shows up under your name. Give it the minimum (one repository, only the connectors it needs), forbid sending or deleting in the prompt, and read the first runs. For an API key, the docs recommend “network secrets” rather than environment variables visible to everyone who uses the environment.

Sources

Want a scheduled task that goes further, wired into your own tools and clients? That is the core of my automation work.