Skip to content
ClaudeClaude

Build a proactive agent workflow with Claude Code

Routines turn Claude Code into a proactive teammate that reads your repo and opens a PR before you've opened your laptop. You'll see one built end to end, learn the trigger, context, and steering decisions behind any routine, and leave one /schedule command away from your first.

May 20, 202622mWatch on YouTube ↗

CHAPTERS

  1. 0:19 – 2:55

    Why proactive agents: turning Claude Code from tool into teammate

    Maya sets the framing for the workshop: many teams want Claude Code to start work without waiting for a prompt. She introduces the goal of building proactive agent workflows so Claude Code can notice issues and act, like a teammate rather than a reactive tool.

    • Workshop context and speaker role (Applied AI at Anthropic)
    • Motivation: agents shouldn’t wait for “press enter”
    • Vision: proactive coding teammate that notices breakages and acts
    • Session focus: building proactive workflows with Claude Code Routines
  2. 2:55 – 4:27

    The pain of cron + DIY infra for proactive Claude Code jobs

    The talk highlights why running Claude Code via cron or custom services is often frustrating. The core challenges center on where the agent runs, how it’s triggered, and how you observe/control it while it runs.

    • Local machine is unreliable for long-running agent sessions
    • You end up building hosting, persistence, and auth
    • Triggering requires cron or custom endpoints/webhooks
    • Hard to observe, steer, or resume headless runs
  3. 4:27 – 4:57

    Introducing Routines: define prompt, repos, connectors, trigger—Claude handles the rest

    Maya introduces Routines as a new Claude Code automation feature. You configure the essentials (prompt, repos, tools/connectors, trigger), and Claude Code manages execution and orchestration.

    • Routines = automated remote Claude Code sessions
    • Configuration inputs: prompt, repositories, connectors, trigger
    • Claude Code manages the underlying infra/workflow
    • Designed to address the three major pain points
  4. 4:57 – 6:28

    Design goals: managed availability, proactive triggers, and interactive sessions

    The feature is shaped around three pillars: always-on managed infrastructure, flexible triggering, and interactive/steerable sessions. The result is automation that still feels like a normal Claude Code session you can jump into anytime.

    • Runs on Claude Code managed infrastructure (hosting, state, auth)
    • Triggers: schedules, GitHub-native events, and custom webhook events
    • Sessions are interactive and steerable (web/CLI/desktop)
    • Can watch, follow up, redirect, and resume sessions
  5. 6:28 – 7:28

    Internal use case: automating documentation PRs as code changes accelerate

    Maya explains why the docs automation mattered internally: Claude Code PR volume increased dramatically, stressing documentation maintenance. Routines helped a docs engineer keep documentation aligned with fast-moving code changes.

    • Claude Code weekly PRs up ~200% since early year
    • Docs maintenance became a bottleneck for a single owner
    • Routines adopted early to automate doc updates
    • Goal: routinely detect changes and open doc PRs
  6. 7:28 – 8:29

    Creating a weekly docs sync routine with /schedule (CLI walkthrough)

    She demonstrates creating a scheduled routine from the terminal using /schedule. Claude asks clarifying questions (timing, notifications) and then generates the routine configuration.

    • Use /schedule in Claude Code to create a routine
    • Prompt: weekly review merged changes vs docs repo; open PR if needed
    • Claude collects details like schedule time and notification preference
    • Routine is created after answering setup questions
  7. 8:29 – 9:31

    The three routine decisions: trigger, context, and steerability

    Maya outlines a reusable mental model for building any routine. You decide when it runs, what information/tools it needs, and how you’ll keep output quality high via steering and validation.

    • Trigger: cadence or event that starts the session
    • Context: repos + connectors + supplemental references
    • Steerability: how you guide and bound the agent mid-flight
    • Quality control: agent review patterns and verification steps
  8. 9:31 – 10:35

    Triggers in depth: schedules vs event-based GitHub signals (and labels/releases)

    This chapter breaks down trigger options in Routines. Maya gives concrete examples like weekly diff checks, release-based runs, or docs-needed labels to initiate documentation work automatically.

    • Time-based schedules for regular maintenance tasks
    • Event-based triggers for lifecycle events (e.g., release cut)
    • GitHub label workflow (e.g., “Need docs”) to auto-run routines
    • Routines can react immediately to development events
  9. 10:35 – 11:35

    Context design: repos plus connectors like Drive and Slack

    Maya explains that context limits success: the routine must be given the repositories and tools it needs. She highlights adding shared writing references from Drive and notifications through Slack to complete the workflow.

    • Grant access to multiple repos (source + docs) when needed
    • Add external knowledge sources (e.g., marketing briefs in Drive)
    • Add notification/action tools (e.g., Slack)
    • Context is the “ceiling” for routine performance
  10. 11:35 – 13:39

    Steering and quality: agent-on-agent review, live intervention, and verification

    The talk covers practical mechanisms to ensure quality and safety. Options include multi-agent generator/critic patterns, observing sessions live, resuming later, and verifying outputs (like rendering docs pages).

    • Generator–critiquer pattern via chained routines
    • Open live sessions to watch, ask questions, and redirect
    • Resume past sessions to continue work
    • Verify outputs (e.g., render docs pages) before accepting changes
  11. 13:39 – 15:09

    Web UI demo: inspecting a scheduled routine run and its PR output

    Maya switches to claude.ai to show how routines appear in the UI, including connected repos, schedule, and connectors. She opens a run to show how Claude follows instructions, diffs changes, and creates a documentation PR.

    • Navigate to Code → Routines in the web UI
    • Routine details: two repos, Monday 10am schedule, GitHub + Slack
    • Session view shows initial instructions and steps taken
    • Claude identifies changes and opens a PR
  12. 15:09 – 18:16

    Event-driven demo: trigger on GitHub issue creation and steer the run

    A second routine is configured to run when a GitHub issue is opened. The issue payload is passed as context; Claude investigates whether it’s a documentation gap, opens a PR if needed, and notifies via Slack—while allowing real-time steering to stop or redirect.

    • Create an event-based routine tied to GitHub “issue opened”
    • Instructions: assess doc gap, open PR, ping Slack channel
    • Issue content is injected as session context
    • Demonstration of mid-run steering to halt/redirect work
  13. 18:16 – 20:47

    Applying Routines to broader workflows: deploy verifier, on-call investigator, backlog triage

    Maya generalizes the pattern to common developer workflows. She walks through how to choose trigger/context/steering for a deploy verifier and mentions other routine ideas like on-call investigations and PM-style backlog prioritization.

    • Deploy verifier: trigger from CD pipeline webhook after deploy
    • Context: service repo + monitoring tools (Datadog/Grafana) + alert channels
    • Steering: start with investigate + go/no-go, evolve toward auto-rollback
    • Other examples: on-call investigator; weekly issue triage across GitHub/Slack
  14. 20:47 – 22:03

    Closing takeaways: proactive beats reactive; start with /schedule

    The session concludes with the central message: proactive agents outperform reactive ones, and Routines remove infrastructure burdens so teams can focus on domain workflows. Maya encourages attendees to create their first routine directly from Claude Code.

    • Proactive agents > reactive agents; tool → teammate
    • Routines remove infra/ops overhead so you focus on process expertise
    • Automation can open PRs and respond to problems automatically
    • Call to action: create a routine with a single /schedule command

Get more out of YouTube videos.

High quality summaries for YouTube videos. Accurate transcripts to search & find moments. Powered by ChatGPT & Claude AI.