Skip to content
Putting technology to work.
Insights to guide decisions and action.

Search articles

Anthropic Routines for Claude Code — Assembling Resident AI Agent Operation Agency in Client Work 2026

Table of contents · 11 items

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

ChallengeConventional limitationsChanges brought by Routines
Dependency updatesManual monthly effort; neglected for six months when stalledWeekly Routines generate PRs automatically
Vulnerability responseSiloed dependence on whoever opens the alertAutomated ticketing via GitHub Advisory webhooks
Documentation obsolescenceInability to keep pace with code changesDaily diff detection + generating update proposals
Initial incident responseOn-duty staff tied down to monitoringAutomated analysis and summarization from Slack alerts
Backlog of code reviewsReview bottlenecks on Friday eveningsInitial 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

LayerRecommended technologyAlternative
Agent foundationClaude Code Routines + SonnetClaude Agent SDK
TriggersGitHub Webhook + Cloudflare WorkersAWS EventBridge
Secret managementGitHub Actions OIDC + Secret ScanningHashiCorp Vault
Cost monitoringAnthropic Usage API + Looker StudioDatadog Cost Monitoring
Log aggregationSlack + Cloudflare Logpush + BigQuerySplunk
GuardrailsCustom pre-flight checks + human reviewBedrock Guardrails
Failure notificationsPagerDutyOpsgenie

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 operationsUnsuitable operations
Dependency update PRsDesign changes requiring business decisions
Automated fixes for static analysis errorsRefactoring that alters UX
Diff updates for README / API documentationFeature design requiring creativity
Triage summarization of vulnerability alertsFinal decisions on high-confidentiality incident responses
Scheduled deletion of stale branchesRelease go/no-go decisions
Generating Sentry / Datadog incident summariesDrafting apologies to customers

Six clauses to include in client contracts

ClauseDetailsWhat the client should verify
Routine scopeInvocation conditions, target repositories, operational scopeLiability for out-of-scope actions
Token capsMonthly token consumption limits and overrun behaviorBudget caps and notification recipients
Erroneous execution SLAResponse times and scope of remediation for malfunctionsAcceptable tolerance for business impact
Secret managementAnthropic API key custodianKey rotation frequency
Log retentionRetention periods for execution logs, PRs, and commitsCompliance requirements
Termination upon contract cancellationElapsed time from cancellation to complete shutdownHandover feasibility

Client-side ROI estimation (model for mid-sized SaaS with 80 employees)

ItemBefore automationAfter automationDifference
Dependency update tasks (monthly)24 hours2 hours-22 hours
Vulnerability triage (monthly)18 hours4 hours-14 hours
Documentation updates (monthly)12 hours1 hour-11 hours
On-call initial incident standby (monthly)40 hours10 hours-30 hours
Monthly total94 hours17 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

WeekAction
Week 1〜3Use case inventory + ROI estimation
Week 4〜6Build 1 pilot Routine + shadow operations
Week 7〜9Production rollout + guardrail hardening
Week 10〜12Adding 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

Share this articleXFacebook
Kakeru Suzuki

Fascinated by the possibilities of technology, has had a deep interest in programming and digital art since student days

Turn this article's theme into your company's next step

Concrete steps forward for your organization.

We organize your desired architecture, legacy systems, and operational requirements to formulate your next steps toward execution.

  • Desired architecture
  • Integration with existing environments
  • Operational requirements
Consult on development & operations initiatives

You can consult with us from the initial conceptual stage. Details from this article will be carried over to the inquiry form.

Receive the latest articles by email