Back to Home

Claude Code Routines: automation for developers

The article describes the new Routines feature in Claude Code from Anthropic — cloud AI agents with support for cron, API, and GitHub triggers. Application scenarios, security mechanisms, and current limitations at the research preview stage are discussed.

Development Automation with Claude Code Routines
Advertisement 728x90

Automating Development with Claude Code Routines: Triggers, Security, and Use Cases

Anthropic has introduced the Routines feature for Claude Code—cloud agents that operate autonomously without user involvement. They support triggers based on schedules (cron), HTTP API, and GitHub events, enabling continuous automation in CI/CD, code reviews, and task management.

How Routines Work in Claude Code

Routines are saved agent configurations including a prompt, connected repositories, and external connectors (e.g., to Linear or Slack). Unlike interactive sessions, they run on Anthropic's infrastructure and keep executing tasks even with the client device turned off. The feature is available on Pro, Max, Team, and Enterprise plans.

Management is available via:

Google AdInline article slot
  • web interface claude.ai/code/routines;
  • /schedule command in CLI;
  • desktop app.

Each routine can have multiple triggers simultaneously. This lets you run the same logic on a cron schedule as well as via an external signal from a pipeline, for example.

Types of Triggers and Their Limitations

Anthropic has implemented three types of triggers:

  • Scheduled—runs on a schedule. Supports hourly, daily, and weekly intervals. Minimum interval is one hour; more frequent requests are rejected.
  • API—personal HTTP endpoint with bearer token. Accepts POST requests. You can pass a text field in the body, which gets added to the main prompt as a one-off message. Handy for processing alerts or error logs.
  • GitHub—responds to repository events: push, pull request, issue, workflow run, and more.

GitHub triggers support flexible filtering:

Google AdInline article slot
  • by commit or PR author;
  • by title;
  • by base and head branches;
  • by labels;
  • by draft status;
  • by merge status (is merged);
  • by fork origin.

Example: automatically route all PRs from forks to extra security review.

Security and Execution Limits

Security is crucial for autonomous agents. By default, Claude Code can only push changes to branches prefixed with claude/. This avoids accidental writes to protected branches like main or release/*.

You can disable this restriction at the repository level with the Allow unrestricted branch pushes option—but do so thoughtfully.

Google AdInline article slot

All routine actions are tied to the owner's account:

  • commits and pull requests are created in their name on GitHub;
  • Slack messages or Linear tasks go through their authorized connectors;
  • routines aren't transferable to other users;
  • each run deducts from that account's daily limit.

In research preview, extra limits apply:

  • GitHub events have hourly quotas; excess is dropped until the next window;
  • behavior and quotas may change without backward compatibility.

Practical Use Cases

Anthropic provides ready-made templates for Routines:

  • Nightly Backlog Triage: connect to a task tracker (e.g., Linear) for automatic categorization, prioritization, or closing of stale tickets.
  • Automatic PR Review: check every pull request against a company checklist—code style, tests, docs.
  • Deployment Verification: call from CD pipeline post-production deploy to verify logs, metrics, or service health.
  • Documentation Sync: weekly scan of API changes and update matching docs sections.

These are gold for teams cutting routine work and boosting code quality without overloading devs.

Key Takeaways

  • Routines run fully in Anthropic's cloud, independent of user activity.
  • Triggers: cron, HTTP API, GitHub events with flexible filtering.
  • Security via branch push limits (claude/ default).
  • Actions run as routine owner, count to their limits.
  • Research preview—API/quotas may shift.

— Editorial Team

Advertisement 728x90

Read Next