Claude Code Routines: Automated Cloud Tasks for AI Development Workflows

Claude Code Routines are saved configurations that package a prompt, one or more repositories, and connectors into automated tasks that execute on Anthropic-managed cloud infrastructure. This means routines continue running even when your local machine is offline.
How Routines Work
Each routine can have multiple trigger types attached:
- Scheduled triggers: Run on recurring cadences like hourly, nightly, or weekly
- API triggers: Execute on demand via HTTP POST to a per-routine endpoint with bearer token authentication
- GitHub triggers: Run automatically in response to repository events including pull requests, pushes, issues, or workflow runs
A single routine can combine multiple triggers. For example, a PR review routine could run nightly, trigger from a deploy script via API, and also react to every new pull request.
Practical Use Cases
The documentation provides several concrete examples of routine applications:
- Backlog maintenance: A schedule trigger runs nightly against your issue tracker via connector, reads new issues, applies labels, assigns owners based on code areas, and posts summaries to Slack
- Alert triage: Monitoring tools call the routine's API endpoint when error thresholds are crossed, passing alert bodies as text. The routine pulls stack traces, correlates with recent commits, and opens draft PRs with proposed fixes
- Bespoke code review: GitHub triggers on pull_request.opened apply team-specific review checklists, leave inline comments for security/performance/style issues, and add summary comments
- Deploy verification: CD pipelines call the routine's API endpoint after production deploys. The routine runs smoke checks, scans error logs for regressions, and posts go/no-go decisions to release channels
- Docs drift detection: Weekly schedule triggers scan merged PRs, flag documentation referencing changed APIs, and open update PRs against docs repositories
- Library porting: GitHub triggers on pull_request.closed (filtered to merged PRs) port changes to parallel SDKs in other languages and open matching PRs
Creating and Managing Routines
Routines are available on Pro, Max, Team, and Enterprise plans with Claude Code on the web enabled. You can create and manage them at claude.ai/code/routines or from the CLI with the /schedule command.
Creation options include:
- Web interface at claude.ai/code/routines
- Desktop app: Click "New task" and choose "New remote task" ("New local task" creates local Desktop scheduled tasks instead)
- CLI with
/schedulecommand
The creation form configures the routine's prompt, repositories, environment, connectors, and triggers. All creation methods write to the same cloud account, so routines created via CLI appear immediately in the web interface.
Current Status and Limitations
Routines are currently in research preview, meaning behavior, limits, and the API surface may change. They execute as full Claude Code cloud sessions without permission-mode prompts.
📖 Read the full source: HN AI Agents
👀 See Also

LORE.md: An Open Standard for Extracting Structured Knowledge from AI Conversations
LORE.md is an open standard for extracting durable knowledge from AI conversations into a structured format. It captures decisions with rationale, insights, patterns, open questions, and next steps, with everything linking across sessions.

cc-lens: Local Dashboard for Claude Code Session Analysis
A developer built cc-lens, a local-first dashboard that reads Claude Code session files from ~/.claude/ and provides usage analytics, cost tracking, and session replay. It runs entirely on your machine with no cloud sync, sign-ups, or telemetry.

ClawProxy: Self-Hosted AI Routing Proxy with Dashboard
ClawProxy is an open-source, self-hosted proxy that centralizes management of multiple AI API keys and models. It provides a unified endpoint, smart key rotation, provider fallback, and real-time logging via a React dashboard.

Claude IDE Bridge: MCP Tool for Remote Editor Access
Claude IDE Bridge is an open-source tool that provides Claude AI with remote control access to code editors via MCP (Model Context Protocol). It exposes editor knowledge like live type information and debugger state as callable tools.