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

Open-source MCP server bridges Claude Code with IDE tools
An open-source MCP server gives Claude Code persistent access to IDE features including LSP, terminals, Git, GitHub, debugging, and diagnostics through 124+ tools. It enables coding from mobile devices when a machine is set up.

Claude Code + MCP generates test suites from source code
Claude Code analyzes source code to generate hierarchical test suites covering modules, features, scenarios, happy paths, edge cases, and error handling, then pushes them to test management systems via MCP.

LLM Skirmish: A Real-Time Strategy Game Benchmark for AI Coding Agents
LLM Skirmish is a benchmark where AI agents write code to play 1v1 real-time strategy games against each other. It uses a modified Screeps API and tests in-context learning across five tournament rounds.

DecisionNode: CLI and MCP Server for Semantic Decision Storage
DecisionNode is a local-only CLI and MCP server that stores structured decisions as JSON, embeds them as vectors for semantic search, and makes them accessible across AI tools via MCP. It's MIT licensed and designed to work with Claude Code, Cursor, Windsurf, Antigravity, and other MCP clients.