Skip to main content
TokenCost logoTokenCost
GuideApril 16, 2026·7 min read

Claude Code Routines: what each automated run actually costs

Routines launched April 14, 2026 as a research preview. They run Claude Code sessions on Anthropic's cloud -- scheduled, webhook-triggered, or fired via API. For subscription users, runs draw from the same daily token pool as interactive sessions: no extra charge within quota. API users pay tokens plus $0.08 per session-hour. A 1-hour Sonnet 4.6 run lands around $0.46.

Dark purple and pink abstract fluid wave, representing automated workflows running in the background

Photo by Pawel Czerwinski on Unsplash

What happens when a Routine runs

A Routine is a saved configuration: a prompt, one or more GitHub repos, and any MCP connectors you want available. Once saved, it runs unattended on Anthropic's servers whenever its trigger fires. No approval prompts. No local machine required. Each run creates a standard Claude Code session, visible in your session list alongside interactive ones.

There are three trigger types. Scheduled Routines run on hourly, daily, weekday, or weekly presets, or on a custom cron expression -- minimum interval is 1 hour. API-triggered Routines get a dedicated HTTP endpoint you POST to, useful for firing a Claude session from a deploy script, a monitoring alert, or any external system. GitHub webhook Routines respond to pull request and release events, with filters on author, branch, label, draft status, and more. A single Routine can combine all three.

One default worth knowing: Routines push code to claude/-prefixed branches, not directly to main. You configure that per Routine.

How many runs you get per plan

Daily run caps apply per account, not per Routine. If you have 10 Routines configured on Pro, the first 5 that fire each day run from your pool. The rest are rejected until the window resets -- unless you enable extra usage in billing settings, at which point additional runs bill at API rates.

PlanPriceDaily runsNote
Pro$20/month5Shares pool with interactive sessions
Max 5x$100/month15Same run cap as Max 20x
Max 20x$200/month15Larger token pool, same run cap
Team Premium$100/seat/month25Min 5 seats; standard $20 seats excluded
EnterpriseCustom25500K context, HIPAA, SSO, audit logs

Source: Claude Code Routines documentation

The actual cost math for API users

If you're running Routines via the API rather than a subscription, each session has two components: standard per-token charges and a $0.08 per session-hour runtime fee for Anthropic's managed cloud infrastructure. The runtime fee accrues only while a session is actively running, not while idle.

Anthropic published a worked example in their cost guide: a 1-hour Opus 4.6 session with 50k input and 15k output (no caching) comes to $0.25 + $0.375 + $0.08 = $0.705. With prompt caching -- 40k of the 50k as cache reads at $0.50/M instead of $5.00/M -- that drops to $0.525. The table below shows the same scenario across all three models at current pricing.

ModelInput / MTokOutput / MTok1-hr run (no caching)With caching
Claude Haiku 4.5$1.00$5.00~$0.21~$0.16
Claude Sonnet 4.6$3.00$15.00~$0.46~$0.34
Claude Opus 4.6$5.00$25.00~$0.71~$0.53

Assumes 50k input tokens, 15k output tokens, 1 hour runtime. Caching scenario: 40k of input as cache reads. Runtime fee: $0.08/session-hour. Sources: Anthropic pricing · Claude Code cost guide

Prompt caching is worth enabling on Routines with fixed system prompts. If your Routine's base prompt and standard file context stay the same between runs, those tokens become cache reads at 6% of the base input rate. A Routine with a large fixed context -- repo structure, style guides, API documentation -- can cut token costs by 30-50% once the cache is warm.

How many tokens does a Routine actually use?

No per-Routine token benchmarks exist yet, so the answer comes from general Claude Code session data. Faros.ai's analysis puts the average enterprise developer at $6-13 per active day at API rates, with 90% under $30/day. Session ranges vary from 10,000 to over 100,000 tokens depending on codebase size, iteration count, and tool call frequency.

We tracked a few nightly code-quality Routines against a mid-size repo (around 40k lines) and saw sessions consistently in the 35k-55k token range -- almost entirely context overhead from reading relevant files, with the actual suggestions coming to perhaps 400-600 tokens of output. The 0.6% code-output ratio from community analysis held up pretty closely. That matters more for Routines than interactive work, because you're not there to trim context between runs.

Routine typeEstimated tokensApprox. API cost (Sonnet 4.6)
Nightly stale PR check + create issue20k-40k$0.10-0.20
On-PR lint + test + comment50k-80k$0.25-0.45
Weekly refactor pass across repo100k-200k$0.55-1.20
Multi-agent Routine (parallel sub-agents)350k-1M+$1.50-5.00+

Estimates based on Claude Code session data from Faros.ai, Verdent, and Anthropic cost guide. Actual usage varies.

Multi-agent Routines are in a different category. When your Routine spawns parallel sub-agents -- each handling a separate file, service, or test suite -- token usage scales roughly 7x versus a single-agent session. Each sub-agent maintains its own full context window. A 10-agent Routine working across a large monorepo can burn through a daily subscription pool in a single run.

When subscription wins, when API wins

The subscription math is compelling at high usage. One developer documented 10 billion tokens over 8 months of intensive Claude Code work. At Sonnet 4.6 API rates, that could easily exceed $15,000. On a Max 5x plan at $100/month, the same 8 months costs $800. The gap closes fast once you're spending more than a few hours per week in Claude Code.

But Routines complicate that math. On a Pro subscription, your 5 daily Routine runs share the same token pool as your interactive sessions. A Routine that reads a large codebase and writes a detailed PR description might consume 60% of your daily pool before you open Claude Code manually. Worth modeling before you automate heavily.

The API makes more sense if your Routines are predictable in cost, infrequent, or shared across a team without per-seat subscriptions. A single weekly refactor Routine at around $0.80 per run is roughly $3-4/month at API rates -- cheaper than adding a subscription seat. Where subscription clearly wins: daily automation at scale, running 15 runs/day on Max 5x from a pool you're already paying for.

How Routines compare to Copilot and Cursor

ToolCost modelScheduleAPI triggerPer-run cost
Claude Routines (subscription)From token poolYes (cron)Yes$0 within quota
Claude Routines (API)Tokens + $0.08/hrYes (cron)Yes$0.20-1.20 typical
GitHub Copilot Agent$0.04 / premium requestNoNo$0.04+
Cursor Background AgentsCredits + 20% surchargeNoNoVariable

GitHub Copilot Coding Agent (GA since March 2026) is the closest competitor for PR automation. Assign a GitHub issue, it writes code and opens a PR, billing at $0.04 per premium request. Simple and predictable. It doesn't support schedule triggers or API triggers, so anything involving cron jobs, deploy hooks, or external system integrations goes to Routines by default.

Cursor Background Agents require MAX mode, which adds a 20% surcharge on top of model costs. No schedule or API triggers. If you're already paying for Cursor, they're convenient for isolated background tasks. They're not designed for the pipeline integration use cases Routines handle.

The trap that's easy to miss

Automated, unattended sessions are the worst-case scenario for unexpected token consumption. A GitHub webhook Routine on a high-activity repo -- 50+ PRs per day, each one triggering a run -- will drain a daily quota in hours and then quietly hit metered overage unless you've set spending limits.

During the research preview, Anthropic applies per-routine and per-account hourly rate limits to prevent runaway costs. Those limits aren't published but are visible at claude.ai/code/routines for your specific account. They're a preview safety net, not a permanent feature.

Exact token counts for subscription plans are not published -- only relative "5x usage" or "20x usage" labels. You find out the real limits by running out, which is the worst time to discover them. Check your current usage at claude.ai before enabling Routines at volume, and set billing alerts if you enable extra usage. The April 2026 Claude Code token crisis -- users hitting limits far faster than expected -- is a good reason to measure first.

Sources