Build a proactive agent workflow with Claude Code
Claude · video · 2026-05-20 source ↗ Reader 🖥️
Agentic SDLCClaude CodeHuman-in-the-LoopLong-Running & Managed AgentsProactive / Trigger-Driven Agents (Routines)Pull Requests & Async Code ReviewAI Workflow Patterns
Coding agents should stop waiting for a human to press enter: Claude Code routines (a prompt, repos, connectors and a schedule/GitHub/webhook trigger, run as steerable sessions on Anthropic-managed infrastructure) turn the tool into a proactive teammate, provided you design each routine around three decisions: when it triggers, what context it has, and how you steer and verify it.
practical · mixed — A conference workshop talk with live demo (Code with Claude). Practical: it argues you should move recurring developer chores out of your own hands into trigger-driven Claude Code sessions (routines). Mostly expository product explanation plus a demonstrated case study and hypothetical use cases; a vendor talk for a just-launched feature, so persuasion and product description are interleaved. Spoken text, so claims are restated and informal.
Structure
| Part | Role |
|---|---|
| Opening hook and thesis: show of hands on running Claude Code on cron; 'a teammate notices when something breaks'; tool today vs teammate tomorrow | Context and framing; establishes the problem as felt pain and the goal as tool-to-teammate |
| Three challenges of building proactive agents today: where to run them, when to trigger them, and how to stay in or out of the loop | Problem statement; each challenge maps one-to-one onto a routines design principle |
| Routines introduced: prompt + repos + connectors + trigger on managed infrastructure; three design goals (always available, customizable triggers, interactive and steerable) | Solution description; the product claims |
| Anthropic documentation-automation case study: weekly docs sync via /schedule and an issue-opened GitHub trigger, with live demo including mid-run steering | Evidence by worked example; instantiates the trigger / context / steerability framework |
| The three decisions framework: trigger (schedule vs event), context (repos, connectors, ceiling on success), steerability (agent-on-agent review, live steering, output verification) | Method; the transferable design checklist |
| Applying routines to your own workflows: deploy verifier (webhook-triggered, graduated autonomy), on-call investigator, PM backlog triage | Generalization by hypothetical examples |
| Takeaways: proactive beats reactive, routines remove infra burden so you focus on domain and process, start with a single /schedule command | Conclusion and call to action |
Key terms
- Routine
A Claude Code automation defined only by a prompt, connected repos, connectors and a trigger; each run is a remote Claude Code session on Anthropic-managed infrastructure that Claude Code launches without a human typing a prompt. - Proactive agent
An agent that is initiated by events or time rather than by a human pressing enter, and that reacts to problems (and opens a PR itself) instead of waiting to be asked. - Trigger (schedule-based vs event-based)
What starts a routine: a time cadence, a native GitHub event (issue opened, PR labeled and merged, release cut), or your own HTTP POST to a webhook whose payload becomes context. - Context (as ceiling)
Everything a routine can access - repos and connectors such as Slack, Google Drive, monitoring tools; 'whatever context Claude has, that's the ceiling of how successful Claude will be.' - Steerability
The ability to guide a running or finished routine session and keep it 'honest': watch it live from web/CLI/desktop, ask questions mid-run, redirect or stop it, resume it later, use a second agent to review, and verify the output. - Agent-on-agent review
A generator-critic arrangement implemented as two routines: one creates the docs PR, another triggers on PR creation and comments on it before a human sees it. - Connector
A tool/data integration (GitHub, Slack, Google Drive, Datadog/Grafana, email/Twilio) attached to a routine so Claude can read context and take outward actions such as pinging you. - Deploy verifier
A hypothetical routine triggered by a CD-pipeline webhook after each deploy that checks service health against monitoring data and issues a go/no-go on rollback, with autonomy graduated as trust grows.
Propositions
- explicitCoding agents should not wait for a human to press enter; Claude Code should evolve from a powerful tool into a coding teammate that notices when something breaks and does something about it.conf: highsupportsThe latest AI news we announced in May 2026 · p9 — Both hold that proactive agents acting without an explicit prompt are the desirable direction; this talk is Anthropic's coding-agent instance.
- explicitBuilding proactive agents yourself requires an infrastructure stack outside your prompts: somewhere durable to host sessions (not your laptop), your own triggering (cron or self-built endpoints), and a way to observe and steer headless sessions, which today can't be watched, steered, or resumed.conf: high
- explicitA routine is defined only by a prompt, connected repos, connectors and a trigger; Claude Code runs it as a remote session on managed infrastructure (hosting, session state, connectors), so nothing depends on your laptop being open.conf: high
- explicitRoutines can be triggered on a time schedule, by native GitHub events (e.g. issue opened, labeled PR merged, release cut), or by your own code POSTing to a webhook endpoint with the event payload passed in as context.conf: high
- explicitEvery routine run is an ordinary Claude Code session that can be opened, watched live, questioned, redirected, stopped, and resumed from web, CLI or desktop, so unattended execution does not forfeit human oversight.conf: high
- explicitDesigning any routine comes down to three decisions: when it triggers, what context it needs, and how you steer it to keep it honest.conf: high
- explicitThe context a routine is given (repos, documents, tools) is the ceiling on how successful it can be, so context provisioning is a first-order design choice, not an afterthought.conf: high
- explicitQuality of unattended runs can be raised by agent-on-agent review: a generator routine opens the PR and a second, PR-triggered routine critiques it before a human looks.conf: highsupportsAccelerating Delivery: How AI Agents Can Own the Initial Code Draft · p5 — Both use a separate reviewing agent to improve output before a human sees it (generator-critic).supportsHarness design for long-running application development · p3 — The routines generator-critic pairing reflects the finding that a separate evaluator is easier to make skeptical than a self-critical generator.
- explicitRoutine output should be verified against reality (for the docs example, render the changed documentation page and confirm it is what you expect), not trusted on the agent's say-so.conf: high
- explicitAnthropic uses routines to automate Claude Code and Agent SDK documentation because weekly Claude Code PRs are up 200% since the new year, leaving a single documentation engineer as the bottleneck; a weekly main-vs-docs-repo diff routine and an issue-opened triage routine each open docs PRs and ping Slack.conf: highsupportsAgent-First Engineering: 9 Playbook Tips for a Zero-Human-Code Future · p7 — Scheduled agents detecting doc/code drift and opening small PRs: Anthropic's docs routines are a concrete instance.supportsHarness engineering: leveraging Codex in an agent-first world · p7 — Both run a recurring agent that finds stale documentation and opens its own fix-up PRs ('doc-gardening').supportsHow Anthropic Builds And How Engineering Will Change Soon | Thariq Shihipar · p14 — Docs sync and issue triage as agent-run loops illustrate the direction of turning the non-coding SDLC into agent loops.
- explicitA deploy verifier is a good routine pattern: trigger via webhook from the CD pipeline, give Claude the service source plus monitoring and alerting tools (Datadog/Grafana, Slack/email/SMS), start with advisory go/no-go analysis you can review and continue from, and later let Claude roll back itself as you come to trust its decisions.conf: highsupportsThe AI-Native SDLC playbook · p11 — Both run production-health response headless from an automated trigger, with response tiers that start at diagnosis.
- implicitHuman oversight and unattended operation are reconciled by making oversight pull-based and optional (an observable, steerable, resumable session you can join at will) rather than gate-based (per-action approval).conf: high
- implicitThe main barrier to proactive coding agents is infrastructure and plumbing (hosting, triggering, session visibility), not model capability, so a vendor-managed runtime unlocks adoption.conf: high
- implicitAgent autonomy should be extended incrementally on the basis of observed track record: advisory first, delegated action only after the human has watched the agent's judgment repeatedly hold up.conf: mediumsupports11 Tips For AI Coding With Ralph Wiggum · p3 — Both advise watching and steering first, and going unsupervised only once the agent's behavior is trusted.
- implicitGood routine candidates are recurring chores with an identifiable trigger, a bounded set of context sources, and an output that can be checked (a PR, a rendered page, a go/no-go), and the question to ask is which daily tasks would benefit from Claude initiating them.conf: medium
- explicitProactive agents beat reactive agents.conf: high
Arguments
Routines make Claude Code a proactive teammate instead of a tool that waits for a prompt. strength: medium
Explicit premises:
- Proactive agents today require you to build hosting, triggering and observability infrastructure yourself.
- Routines supply managed infrastructure, schedule/GitHub/webhook triggers, and sessions that can be watched, steered and resumed.
- A teammate notices problems and acts; a tool waits for enter.
Implicit premises:
- Infrastructure burden, not model capability, is what stops teams from running proactive agents.
- Being event-initiated is the defining difference between a teammate and a tool.
- Steerable sessions are enough oversight for unattended agents with write access and outward connectors.
- Running work on Anthropic-managed infrastructure with repo and Slack/Drive access is acceptable on data and trust grounds.
Inferences:
- Any recurring developer chore with a detectable trigger becomes a candidate for delegation, which raises the volume of agent-authored PRs and review load.
- Teams currently running Claude Code from cron or CI can migrate to routines, trading control for convenience.
How well a routine works is determined by three design decisions: trigger, context and steerability. strength: medium
Explicit premises:
- Context is the ceiling on success.
- Agent-on-agent review (generator-critic) can check output before a human does.
- Live viewing, mid-session questions and resume let a human correct course.
- Verifying the output (e.g. rendering the docs page) confirms it is right.
Implicit premises:
- Failures of unattended agents are mainly setup and design failures that the author of the routine can fix, not model unreliability.
- The output of the targeted tasks is cheap and reliable to verify.
- More context is better, with no accounting for risk from broader connector access.
Inferences:
- Connectors determine blast radius as well as the success ceiling, so the context decision is also a security decision.
- Where output is hard to verify (design, judgment-heavy work), the framework offers little.
A deploy-verifier routine should start advisory and graduate to autonomous rollback as trust is earned. strength: medium
Explicit premises:
- A CD pipeline can post a webhook after each deploy to trigger a session.
- Claude with source code and monitoring tools can investigate service health and produce a go/no-go.
- The human can read the analysis in the web session and continue working with Claude.
Implicit premises:
- Monitoring data is a sufficient and trustworthy ground truth for a rollback decision.
- The human can detect, by watching, whether the agent's judgment is actually good enough to hand over rollback authority.
- Trust accumulates from observed correct decisions, without requiring any formal evaluation.
Inferences:
- Staged autonomy needs a record of the agent's past decisions and outcomes to calibrate trust against, which the talk does not provide.
- Rare-but-severe incidents will be underrepresented in the observed history that grants autonomy.
Documentation maintenance is a good fit for routines. strength: medium
Explicit premises:
- Weekly Claude Code PRs are up 200% since the new year.
- One engineer maintains the docs for Claude Code and the Agent SDK.
- Routines on a weekly schedule and on GitHub issue-open diff source against docs and open PRs, pinging Slack.
Implicit premises:
- Doc updates are low-risk, reviewable and reversible (a PR), so they tolerate autonomy.
- Reviewing agent-opened docs PRs costs the engineer far less than writing the updates.
- Claude can reliably judge from code diffs and issues which docs are out of date.
Inferences:
- The automation converts a writing bottleneck into a review bottleneck unless the PRs are reliably good.
- The pattern generalizes to other drift problems (config, changelogs, runbooks).
Narratives
- Audience poll: who has run Claude Code on cron? Hands up. Who enjoyed building and maintaining that infra? One person.
→ Frames the infra burden as a shared, felt pain that routines remove (supports the proposition that infra, not capability, is the barrier). - A single documentation engineer ('our documentation queen') drowning as weekly Claude Code PRs rise 200%; she becomes an early adopter and sets up routines to keep docs current.
→ Shows speed-up in code production creating downstream maintenance bottlenecks that routines address; supports the docs-automation case. - Live demo: /schedule with a one-line weekly prompt; Claude asks clarifying questions (time, notification) and generates the routine and its instructions; the run on Monday at 10:00 reads the source repo, change log and docs repo and opens a PR.
→ Demonstrates that a routine can be created conversationally and that Claude writes its own operating instructions; supports the routine-definition and schedule-trigger claims. - Live demo: an issue-opened GitHub trigger starts a session with the issue passed in as context; the presenter knows a PR for it already exists and tells Claude to stop mid-run.
→ Shows event payload as context and real-time steering after kickoff; incidentally exposes that the routine had no awareness of in-flight human work. - Hypothetical: a deploy verifier triggered by the CD pipeline webhook that checks monitoring tools, recommends go/no-go on rollback, and may eventually roll back on its own as trust grows.
→ Illustrates the trigger / context / steerability framework and graduated autonomy. - Hypotheticals: an on-call investigator, and a PM weekly job reading GitHub issues and Slack posts to prioritize and open PRs.
→ Generalizes the pattern beyond docs to triage-style roles.
Questions addressed
- ✅ How can a team run Claude Code proactively and unattended without building its own hosting, triggering and observability stack?
Routines: managed infrastructure, schedule / GitHub / webhook triggers, and sessions that are normal Claude Code sessions. - ✅ How can humans keep oversight of agents that are meant to run with a human out of the loop?
Watch, ask, steer, stop and resume the live session; add agent-on-agent review and output verification; graduate autonomy as trust builds. - ⭕ Which tasks are suitable for a routine, and how should one decide?
Only a prompt to the audience to think of daily tasks, plus the trigger / context / steerability checklist; no selection criteria for what should not be delegated. - ⭕ What are the security, cost and failure-handling consequences of event-triggered agents with write access and outward connectors?
Not addressed.
Gaps
- incompleteNo security or permission model for unattended routines. The issue-opened trigger feeds untrusted external text (a GitHub issue) into a session that holds repo write access, Slack and other connectors, which is the lethal-trifecta shape; the talk advises giving as much context and as many connectors as the task wants ('context is the ceiling') without discussing prompt injection, scoped credentials, or what limits the blast radius of an event-triggered run.
Read next: extract-claude-code-dynamic-workflows-harness-every-task (quarantine pattern for triage workflows) and the corpus's lethal-trifecta / delegated-authority-grants material for what a hardened routine needs. - incompleteNo cost, rate-limit or runaway-trigger discussion. A routine triggered on every issue, release or deploy runs a full agent session each time, but the talk gives no guidance on per-run cost, usage limits, deduplication of bursts, or guards against loops (e.g. an agent-opened PR triggering another routine).
Read next: Corpus material on agent cost prediction and usage-limit rationing; operational limits documentation for routines. - incompleteNo evidence of effectiveness. The docs case reports the 200% PR growth and shows a working demo, but no acceptance rate of agent-opened docs PRs, false-positive noise, time saved, or the review load the routines put on the one documentation engineer; it quietly turns a writing bottleneck into a review bottleneck, and agent-on-agent review defers rather than answers that.
Read next: Read against extract-osmani-orchestration-tax-is-you and the corpus's verification-capacity and measuring-AI-impact material; look for independent data on agent-authored maintenance PRs. - incompleteRoutines appear to be stateless across runs and unaware of in-flight human work. In the live demo the presenter has to stop the run because a PR for that issue already existed; the talk does not say how a routine deduplicates against open PRs, remembers prior runs, or recovers from partial failures.
Read next: Corpus material on agent memory and durable execution (checkpoint-and-resume, idempotency) for what a repeatedly-triggered agent needs to be safe to rerun. - incompleteThe 'build your own cron and infra' comparison is a strawman: no comparison with existing alternatives such as headless claude -p in CI, GitHub Actions, or other vendors' scheduled agents, and no discussion of lock-in, data residency or what is lost by running on vendor-managed infrastructure.
Read next: extract-claude-code-best-practices (headless mode in CI), extract-claxton-ai-native-sdlc-playbook (headless incident response), and the corpus's vendor lock-in material.
Closes gaps elsewhere
- 10 Things Developers Want from their Agentic IDEs in 2025 · g1 — Partially resolves the background-agent vs human-in-the-loop tension by making oversight pull-based (live watch, steer, stop, resume) plus agent-on-agent review and graduated autonomy, rather than per-action approval gates.
- The AI agent that shows up before you ask · g1 — Gives the concrete engineering of 'proactive' that the Svenson piece omits: a trigger source (schedule, native GitHub events, or webhook POST with payload as context) launching a managed, resumable session.
Related documents
- 11 Tips For AI Coding With Ralph Wiggum
- How Anthropic Builds And How Engineering Will Change Soon | Thariq Shihipar
- Harness engineering: leveraging Codex in an agent-first world
- Agent-First Engineering: 9 Playbook Tips for a Zero-Human-Code Future
- Harness design for long-running application development
- Accelerating Delivery: How AI Agents Can Own the Initial Code Draft
- The latest AI news we announced in May 2026
- Zero to Agent in 30 Minutes: Build a Hermes Social Media Agent with Craig Hewitt
- Cloudflare Turns CI Pipelines into TypeScript Workflows
- Head of Claude Code: What happens after coding is solved | Boris Cherny