🚀 Launching "Routines": Transforming Claude Code from a Reactive Tool to a Proactive Teammate
TL;DR. Anthropic's Claude Code Routines eliminate manual boilerplate, turning Claude into a proactive AI teammate. Start building autonomous coding agents today.
Published: May 31, 2026, 09:39 AM · Updated: Jun 28, 2026
Topic: Agentic Ai
Source: https://www.youtube.com/watch?v=eSP7PLTXNy8
đź“‹ Overview
- Type: Workshop / Product Launch & Tutorial
- Main Topic: The introduction of "Routines" in Claude Code, a feature that eliminates the need for manual agent infrastructure by allowing developers to easily set up, guide, and monitor autonomous, proactive AI coding agents.
- Speakers: Mia (Member of the Applied AI Team at Anthropic)
🎯 Core Purpose & Context
This workshop was conducted to address a massive pain point in the current AI developer ecosystem: building proactive, background-running AI agents requires excessive boilerplate infrastructure (cron jobs, hosting, webhooks). Mia aims to introduce "Routines"—Anthropic's managed solution—to help developers transition Claude from a reactive "tool" waiting for a prompt, into an autonomous "teammate" that detects issues and takes action based on schedules or native events.
Figure 1: The core paradigm shift — from a reactive AI that waits for a prompt to a proactive agent that monitors, detects, and acts independently.
Figure 2: The five-step workflow for deploying a Claude Routine — from a single /schedule command to live agent monitoring via the web UI.
đź§ Key Concepts & Steps (Tutorial Integration)
Core Concepts:
- Proactive vs. Reactive Agents: Moving from an AI that waits for the user to press "Enter" (Reactive), to an AI that actively monitors environments and initiates tasks independently (Proactive).
- Managed Agent Infrastructure: Anthropic handles data persistence, session state, hosting, and authentication. Developers no longer need to rely on local machines or build secondary cloud stacks to keep agents alive.
- Generator-Critiquer Pattern (Agent-on-Agent Review): A system architectural pattern where one AI routine generates work (e.g., writes code) and a second, independent routine triggers to automatically critique and review that work before human intervention.
Step-by-Step Guide: Creating a Routine via CLI
- Initiate: Open your terminal and launch Claude Code.
- Command: Type
/schedulefollowed by natural language instructions (e.g., "Once a week, review merged changes and create a PR to update Docs"). - Configure: Claude will autonomously ask follow-up questions to refine the routine (e.g., "What time every week?", "Should I ping you on Slack?").
- Deploy: Claude generates the routine, linking necessary repos and connectors on the backend.
- Monitor/Steer: Open the Claude web interface (
claude.ai), navigate to the "Code" panel, and click on "Routines" to watch the agent work in real-time, inject new instructions, or halt the process.
Figure 3: The Generator-Critiquer pattern — stacked Routines create a self-policing review pipeline without any custom orchestration software.
đź§ Strategic Analysis & "Game Changers"
- Hidden Connections: Mia mentions that Claude Code PRs internally at Anthropic went up 200% since the new year. This indicates a hidden consequence of AI coding tools: Exponential Technical Debt and Operational Drag. By making engineers 3x faster at pushing code, they unintentionally crushed their documentation engineer. "Routines" is Anthropic's solution to a bottleneck they themselves created. Code velocity outpaced tangential maintenance, making autonomous agents a necessity, not a luxury.
- The "So What?": The biggest barrier to enterprise agentic AI is not the AI's intelligence; it's the DevSecOps overhead required to safely host, authenticate, and monitor headless AI sessions. By absorbing this infrastructure burden (auth, state persistence, webhook listeners), Anthropic is positioning Claude Code not just as an IDE extension, but as a robust, native CI/CD platform component.
- Game Changer: Live Session Steerability for Headless Agents. Historically, autonomous agents run in "black boxes"—you kick them off and cross your fingers, hoping they don't hallucinate or enter expensive failure loops. The ability to monitor an autonomous background task via a Web/CLI UI, jump in exactly where the agent is, ask it a question mid-execution, or manually halt it (as Mia demonstrated) fundamentally alters the trust dynamics of AI adoption. It bridges the gap between "Human-in-the-loop" and "Human-out-of-the-loop."
📊 Detailed Breakdown
(Note: Timestamps reflect the sequential flow of the provided transcript, inclusive of the timecode reset halfway through the text).
[00:00:00 - 00:03:13] The Paradigm Shift: Tool vs. Teammate
- Mia introduces her role at Anthropic: spending half her time developing first-party products, and half helping customers build agents on top of Anthropic models.
- She highlights a vast developer pain point: attempting to run Claude Code autonomously using traditional Cron jobs. Maintaining the infrastructure for this is miserable.
- Core Philosophy: Coding agents should not wait for a human to press enter. A "tool" waits; a "teammate" notices when something is broken and acts proactively.
[00:03:36 - 00:06:51] The Overheads of Building Proactive Agents Today Mia breaks down the specific technical hurdles developers face when building autonomous agents from scratch:
- Hosting & State: Running agents on a local laptop is risky; if it shuts down, the session dies. Devs must manage robust cloud hosting and data persistence.
- Trigger Infrastructure: Devs must build custom Cron jobs or spin up dedicated endpoints/webhooks just to receive triggers.
- The Black Box Problem: Once a headless session is kicked off, developers lose visibility. They cannot steer, bound, watch, or resume the session without building complex custom dashboards.
[00:06:51 - 00:09:59] Introducing "Routines" Architecture
- Routines allow devs to define just four things: Prompt, Repositories, Connectors, and a Trigger. Anthropic handles everything else.
- Managed Infra: Session state and connector authentication are dealt with server-side by Anthropic.
- Custom Triggers: Supports time-based scheduling, native GitHub event integration, and custom payload injection via custom webhooks.
- Omni-channel Steerability: Any automated routine is ultimately just a standard Claude Code session under the hood. Devs can interject from the Web UI, CLI, or Desktop app seamlessly.
[00:09:59 - 00:12:56] Internal Case Study: Automating Documentation
- Anthropic engineers increased their weekly PR output by 200% at the start of the year.
- This overwhelmed "Sarah," the sole documentation engineer managing the Claude Code and Agent SDK docs.
- Solution: Sarah used the
/schedulecommand in the CLI to instruct Claude: “Once a week, review all new changes merged to main against our docs repo and create a PR to update Docs...” - Claude handled the setup conversationally, asking refining questions about notification preferences (e.g., Slack pings).
[00:13:38 - 00:14:52] The 3 Pillars of Designing a Routine Mia outlines the strategic decisions required when mapping out an automation:
- Trigger: When does it run? (Time-based vs Event-based).
- Context: What does it need? (Repos, Google Drive for marketing language matching, Slack for notifications). Crucial note: The AI's access to context defines the "ceiling of its success."
- Steerability: How is output validated? (Human monitoring vs. Agent-on-Agent review).
-- Timestamp Reset in Original Transcript Flow --
[00:10:00 - 00:12:35] Trigger and Context Deep-Dive
- Scheduled Triggers: Good for weekly gap-analysis syncs between source code and documentation.
- Event Triggers: Trigger code execution based on a release branch being cut, or a specific label (e.g., "Need Docs") being applied to a merged PR.
- Connectors: Mia details providing the AI with secondary knowledge bases. E.g., Connecting Google Drive so Claude can mimic internal marketing verbiage when generating external documentation.
[00:12:35 - 00:14:54] Implementing Agent-on-Agent Review (Generator-Critiquer)
- Mia explicitly advocates for multi-agent systems via Routines.
- Workflow example: Agent A creates a PR for documentation. Agent B is triggered by Agent A's PR creation. Agent B reviews the code and leaves automated critique comments before a human engineer ever looks at it.
- Developers maintain authority by rendering and verifying the final PR outputs.
[00:14:54 - 00:17:38] Live Demo 1: Time-Based Routine in Web UI
- Mia transitions to
claude.ai, navigating to the Code section via the left-hand panel. - She inspects the weekly Monday 10:00 a.m. synchronization Routine.
- The UI shows full transparency: Devs can see Claude reading the source code, checking the changelog, comparing it against the docs repo, and successfully opening a PR.
[00:17:38 - 00:21:21] Live Demo 2: GitHub Event Triggers & Active Steerability
- Mia sets up a new Routine to trigger whenever a new "GitHub Issue" is opened.
- Task: If a user opens an issue complaining about missing docs, Claude must investigate, write the docs, open a PR, and ping Mia on Slack.
- She tests this by manually creating an issue: "Tools missing from docs in new version."
- The "Steerability" Moment: The Routine fires immediately. Mia watches Claude start thinking. However, she already fixed this issue manually. She types directly into the live autonomous session: "Stop this session, I've already made these changes." Claude obeys immediately. This proves the utility of human-in-the-loop intervention for autonomous tasks.
Figure 4: Four core capabilities that define the Routines feature — collapsing the infrastructure, behavioral, observability, and orchestration gaps of agentic AI development.
[00:21:21 - 00:22:30] Real-World Enterprise Use Cases Mia concludes by translating this tech to specific engineering personas:
- Derisking Deployments (DevOps): A Routine triggered by a CI/CD deployment webhook. Claude is given access to source code and monitoring tools (Datadog/Grafana). If metrics spike, Claude runs an investigation, recommends "Go/No-Go," or automatically reverts the code and texts the on-call engineer via Twilio.
- On-Call Triage: Digging through incident reports autonomously.
- Product Management (Backlog Grooming): A weekly Routine that scans endless GitHub issues and Slack threads, categorizes them, and prioritizes PR generation for critical fixes.
🔑 Key Takeaways
- Total Infrastructure Abstraction: "Routines" completely removes the DevSecOps overhead (hosting, chron, auth, webhooks) previously required to run background AI agents.
- "Tool" to "Teammate" Evolution: Coding AIs are moving from passive command-receivers to active system-monitors capable of identifying and remediating gaps autonomously.
- Live Interruptibility: The ability to open a web portal and watch an autonomous agent's "chain of thought" in real-time—and halt or divert it mid-task—cures the "black box" anxiety of deploying AI on production codebases.
- Native Agentic Code Review: By stacking Routine triggers, developers can easily build self-policing multi-agent pipelines (Generator-Critiquer) without complex orchestrator software like LangChain.
âť“ Unresolved Questions / Follow-up
- Cost Management: If an event-based routine triggers on heavily active repos (e.g., triggering on every PR or Issue), how does Anthropic prevent catastrophic token pricing runaways? Are there natively built budget limits?
- Security Boundaries: If an agent is given access to source code, GitHub, and production Datadog data, what are the built-in safeguards to prevent it from executing unapproved destructive actions (like a rollback) if it misinterprets a metric?
- Platform Limitations: What is the maximum duration a Routine session can remain active before Anthropic's managed servers time it out?
Tags: Agentic AI, Developer Tools, Workflow Automation, Continuous Integration, Anthropic
Frequently Asked Questions
What are Routines in Claude Code?
Routines are an Anthropic-managed feature in Claude Code that let developers set up autonomous, proactive AI coding agents without building their own infrastructure. They transform Claude from a reactive tool that waits for a prompt into a proactive teammate that monitors environments and takes action based on schedules or native events. Anthropic handles hosting, session state persistence, authentication, and trigger infrastructure on the backend.
How do you create a Routine in Claude Code?
Open your terminal, launch Claude Code, and type the /schedule command followed by natural language instructions, such as asking it to review merged changes weekly and create a PR to update docs. Claude then asks follow-up questions to refine the routine, like what time it should run and whether it should ping you on Slack, before generating it and linking the necessary repos and connectors. You can monitor and steer it from the Code panel under Routines at claude.ai.
What is the Generator-Critiquer pattern in Claude Routines?
The Generator-Critiquer pattern is a multi-agent setup where one Routine generates work, such as Agent A creating a documentation PR, and a second independent Routine, Agent B, is triggered by that PR to automatically critique and review the code. Agent B leaves automated critique comments before any human engineer looks at the work, while developers retain final authority by verifying the rendered PR outputs. This creates a self-policing review pipeline without custom orchestration software.
Can you stop or steer an autonomous Claude agent while it is running?
Yes, any Routine is ultimately a standard Claude Code session under the hood, so you can interject from the Web UI, CLI, or Desktop app at any time. You can watch the agent's chain of thought in real time, inject new instructions, ask it questions mid-execution, or halt it entirely. In a live demo, Mia typed Stop this session, I've already made these changes into a running autonomous session and Claude obeyed immediately.
What problems do developers face when building proactive AI agents without Routines?
Developers must manage robust cloud hosting and data persistence because running agents on a local laptop risks losing the session if it shuts down. They also have to build custom cron jobs, dedicated endpoints, or webhooks just to receive triggers, and they lose visibility once a headless session is launched. Without custom dashboards, they cannot steer, bound, watch, or resume the session, creating a black box problem.
Glossary
- Proactive Agent
- An AI agent that anticipates needs and operates autonomously based on distinct triggers and events, rather than waiting for direct instructions.
- Reactive Agent
- An AI tool that strictly waits for a human to input a prompt and press enter before executing any instructions.
- Claude Code (Quad Code)
- A first-party AI coding tool developed by Anthropic allowing developers to build interactive components and automated, remote workflows natively.
- Routines
- A feature within Claude Code that orchestrates executing remote, headless agent sessions via specified triggers, without the need for manual infrastructure management.
- Cron
- A classic time-based job scheduler used fundamentally in Unix-like operations, often requiring tedious infrastructure when repurposed manually for custom AI deployments.
- Boilerplate Code
- Repetitive, non-unique infrastructure code developers must construct manually when attempting to host and build native agent persistence architectures.
- Data Persistence
- The ability of an agent's session and memory sequence to be preserved securely in the cloud across time, surviving local hardware disruptions.
- Native GitHub Events
- Integrated triggers allowing real-time actions happening inside a software repository, like issue creation or PR merges, to immediately spawn AI sessions.
- Webhook
- A user-defined HTTP callback that dynamically triggers behavior—such as deploying a verification Routine—by receiving automated post requests from external services.
- Headless Session
- An autonomous computation interaction executing entirely absent of a graphical interface natively, running strictly in the virtual background.
- Managed Infrastructure
- A cloud architecture framework directly maintained by Anthropic, relieving developers of hosting servers and monitoring autonomous session maintenance.
- Agent-on-Agent Review
- An auditing workflow wherein one AI session parses and critically reviews the generative output produced actively by an entirely different AI routine.
- Generator-Critiquer Pattern
- A prominent multi-agent system structure establishing two respective models: one solely generates work context, the other strictly debugs and optimizes it.
- Human-in-the-Loop
- A process standard retaining human oversight mid-workflow where an AI requests distinct manual validation before finalizing a dangerous systemic change.