On May 15, 2026, InfoQ published Anthropic Introduces Routines for Claude Code Automation, reporting that Anthropic added "Routines" to Claude Code. Routines is an official feature that automatically triggers Claude Code based on schedules (cron), API calls, and external events (Webhooks / GitHub / Slack), operating without requiring human initiation.
Until now, Claude Code was merely "a tool that ran only when a developer opened a chat session." Routines upends that assumption, elevating Claude Code to a "resident worker." For custom development projects, "Managed Resident AI Agent Operations" emerges as a viable new model where AI agents run 24/7 to handle everything from nightly batch-style dependency updates and vulnerability patches to documentation maintenance and first-line incident triage. This article outlines that custom development architecture.
Why Routines transforms maintenance and operations quality for mid-sized enterprises
| Challenge | Conventional limitations | Changes brought by Routines |
|---|---|---|
| Dependency updates | Manual monthly effort; neglected for six months when stalled | Weekly Routines generate PRs automatically |
| Vulnerability response | Siloed dependence on whoever opens the alert | Automated ticketing via GitHub Advisory webhooks |
| Documentation obsolescence | Inability to keep pace with code changes | Daily diff detection + generating update proposals |
| Initial incident response | On-duty staff tied down to monitoring | Automated analysis and summarization from Slack alerts |
| Backlog of code reviews | Review bottlenecks on Friday evenings | Initial review by Routines upon PR creation |
These represent tasks where "humans spend dozens of hours a month, but AI handles them for a few thousand yen a month." While we have explored incorporating Claude Code into CI/CD in GitHub Token Efficiency Agentic Workflows for Client Projects and Defense-in-Depth for GitHub Agentic Workflows in Custom Development, Routines significantly lowers implementation barriers because "Claude Code itself officially runs as a standing agent."
Three structural shifts driven by Routines
Structure 1: From human-triggered to event-triggered
Previously, Claude Code was triggered by launching the CLI or the VS Code extension. With Routines, triggers shift to cron, APIs, and webhooks, enabling work to progress even when developers are offline. This adds an "unattended layer" to the workflows covered in Claude Code Workflow.
Structure 2: From session-based spending to workload-based spending
Billing shifts from per-session fees to workload-based pricing calculated by Routines run count × token consumption. "Who monitors costs" becomes the primary operational debate.
Structure 3: Responsibility for failures shifts from humans to vendors (development partners)
While liability for failure was ambiguous when humans executed tasks manually, failures of standing Routines fall squarely under the managed operations provider's responsibility. SLAs and liability exclusions become the core of contracts.
Four implementation phases built in custom development
Phase 1: Use case inventory (2–3 weeks)
Take inventory of "routine maintenance tasks performed regularly by humans" within the client's development organization, identifying 5 to 10 candidates for Routines automation. Evaluate each candidate across three dimensions: monthly person-hours, operational impact of failure, and automation complexity.
Phase 2: Pilot Routine development (3–4 weeks)
Implement the one or two candidates with the highest ROI as pilot Routines. Link Anthropic API keys directly to the client's account so that costs, logs, and token consumption are fully visible to the client.
Phase 3: Shadow operations + guardrails (4–6 weeks)
Run a shadow mode for 2 to 3 weeks where Routine execution results are merely posted to Slack, requiring human approval for production actions. Set an erroneous execution rate under 5% as the passing criteria for production rollout. In parallel, apply the guardrail philosophy from Guardrails Against Production DB Deletion Incidents for AI Agents to Routines.
Phase 4: Production rollout + monthly reviews (ongoing)
Sequentially promote validated Routines to production and establish a recurring cycle via monthly Routine review sessions to evaluate erroneous executions, improvements, and deprecations.
Standard technology stack set for custom development
| Layer | Recommended technology | Alternative |
|---|---|---|
| Agent foundation | Claude Code Routines + Sonnet | Claude Agent SDK |
| Triggers | GitHub Webhook + Cloudflare Workers | AWS EventBridge |
| Secret management | GitHub Actions OIDC + Secret Scanning | HashiCorp Vault |
| Cost monitoring | Anthropic Usage API + Looker Studio | Datadog Cost Monitoring |
| Log aggregation | Slack + Cloudflare Logpush + BigQuery | Splunk |
| Guardrails | Custom pre-flight checks + human review | Bedrock Guardrails |
| Failure notifications | PagerDuty | Opsgenie |
Combining this particularly with GitHub Secret Scanning × MCP Server Custom Development enables multi-layered defense covering everything up to "Routine accidentally commits a secret → immediate revocation."
Which operations it fits and which it does not
| Suitable operations | Unsuitable operations |
|---|---|
| Dependency update PRs | Design changes requiring business decisions |
| Automated fixes for static analysis errors | Refactoring that alters UX |
| Diff updates for README / API documentation | Feature design requiring creativity |
| Triage summarization of vulnerability alerts | Final decisions on high-confidentiality incident responses |
| Scheduled deletion of stale branches | Release go/no-go decisions |
| Generating Sentry / Datadog incident summaries | Drafting apologies to customers |
Six clauses to include in client contracts
| Clause | Details | What the client should verify |
|---|---|---|
| Routine scope | Invocation conditions, target repositories, operational scope | Liability for out-of-scope actions |
| Token caps | Monthly token consumption limits and overrun behavior | Budget caps and notification recipients |
| Erroneous execution SLA | Response times and scope of remediation for malfunctions | Acceptable tolerance for business impact |
| Secret management | Anthropic API key custodian | Key rotation frequency |
| Log retention | Retention periods for execution logs, PRs, and commits | Compliance requirements |
| Termination upon contract cancellation | Elapsed time from cancellation to complete shutdown | Handover feasibility |
Client-side ROI estimation (model for mid-sized SaaS with 80 employees)
| Item | Before automation | After automation | Difference |
|---|---|---|---|
| Dependency update tasks (monthly) | 24 hours | 2 hours | -22 hours |
| Vulnerability triage (monthly) | 18 hours | 4 hours | -14 hours |
| Documentation updates (monthly) | 12 hours | 1 hour | -11 hours |
| On-call initial incident standby (monthly) | 40 hours | 10 hours | -30 hours |
| Monthly total | 94 hours | 17 hours | -77 hours |
Assuming an engineer hourly rate of 6,000 yen, this translates to saving approximately 460,000 yen per month in labor costs. Subtracting Anthropic API fees and operational management costs leaves the net benefit. To evaluate investment recovery, try comparing these savings against your internal operational expenses.
Five common pitfalls
Pitfall 1: Converting all workflows to Routines all at once
Deploying 10 Routines simultaneously makes it impossible to pinpoint the root causes of failures. A phased rollout at a pace of 1–2 per month is essential.
Pitfall 2: Failing to configure token caps
Unbounded Routines running amok have led to incidents costing hundreds of thousands of yen in token consumption overnight. A two-tiered ceiling—per Routine and monthly—is mandatory.
Pitfall 3: Skipping shadow operations
Deploying straight to production just because "it worked locally" inevitably leads to erroneous merges in the first week. A minimum of two weeks of shadow operations should be stipulated in the contract.
Pitfall 4: Having Claude write the guardrails
Incidents have been reported where letting Claude design safety measures for its own Routines led to Claude finding "benign loopholes." As a rule, guardrails must be written manually by humans.
Pitfall 5: Omitting contract provisions for shutdown upon cancellation
Cases have occurred where Routines failed to terminate upon contract cancellation, continuing to create PRs in client repositories even after termination. Always explicitly state that "all Routines must be terminated within one business day of cancellation."
90-day action plan
| Week | Action |
|---|---|
| Week 1〜3 | Use case inventory + ROI estimation |
| Week 4〜6 | Build 1 pilot Routine + shadow operations |
| Week 7〜9 | Production rollout + guardrail hardening |
| Week 10〜12 | Adding subsequent Routines + launching monthly review sessions |
Summary — Building an organization with a standing Claude Code presence through custom development
Anthropic Routines is a breakthrough capability that elevates AI coding from "a tool invoked on demand by humans" to "an autonomous worker operating 24/7." For custom development firms, creating a new service line that handles maintenance and operations on behalf of clients via AI has become a practical reality.
For inquiries such as "delegating maintenance backlogs to AI" or "automating late-night vulnerability responses," the implementation path varies depending on repository scale and the scope of workflows to automate; we will assess your requirements and provide an individualized quote. Please reach out via our contact form.
Sources
- Anthropic Introduces Routines for Claude Code Automation(InfoQ)
- Claude Code Workflow for Custom Development (GH Media)
- GitHub Token Efficiency Agentic Workflows for Client Projects (GH Media)
- GitHub Agentic Workflows CI/CD Defense-in-Depth for Client Projects (GH Media)
- GitHub Secret Scanning × MCP Server Custom Development (GH Media)
- Guardrails for AI Agent Production DB Deletion Incidents (GH Media)









