Field notes, plus a tool at the end
Claude Code · Routines
Proactive Agents · Talk + Work Order
FAH-ROUT-004 · read ≈ 8 min · then build one in ≈ 2

Don't wait
for Enter.

A coding agent that waits for you to press Enter is a tool. One that notices something broke and opens the PR itself is more like a teammate. Routines is the Claude Code feature for crossing that line. At the bottom of this page you can build one of your own, with its audit contract attached.

Subject
Claude Code Routines
Speaker
Maya · Applied AI
Venue
Code with Claude · Day 1
Shape
Explainer + tool
Source
Claude / YouTube

A routine has four parts: a prompt, the repositories it can touch, the connectors it can reach, and a trigger for when it wakes up. Where it runs and how it stays alive are handled for you. The change is small. You go from an agent you start to an agent that starts itself.

01 · The shift

Tool → teammate

A tool waits for your prompt, then your keystroke. A teammate notices when something breaks and acts on it. Routines is built to close that gap.

02 · The definition

Four ingredients

A prompt, the repos, the connectors, the trigger. Claude Code's managed infrastructure handles the hosting and the auth.

03 · The payoff

Skip the plumbing

You stop building and babysitting cron jobs and webhook receivers. That attention goes to your actual work instead.

§ 01 · The problem

Running an agent on a cron is mostly infrastructure.

The talk opens with a show of hands. Plenty of people have tried running Claude Code on a cron. Then the follow-up: keep your hand up if you enjoyed building and maintaining all of that infrastructure. One hand stays up, somewhere in the back.

That gag is the whole point. Proactive agents are already possible; you can stand one up yourself. The friction isn't capability. It's the scaffolding you have to build around the prompt first. The talk sorts it into three recurring pains.

i

Where it runs

Your laptop is the wrong host. Close the lid or let it die and the session dies with it. Keeping it alive means hosting and auth: boilerplate that has nothing to do with the task.

ii

When it fires

Something has to decide the agent should wake up. Time-based means standing up cron; event-based means spinning up endpoints to receive posts. Either way, more infrastructure to write and run.

iii

Whether you can see in

Sometimes you want a human in the loop, sometimes out of it. But a headless session is a black box. Once it starts, there's often no clean way to watch it or steer it.

The core complaint

You can't watch or steer what you can't see. That opacity is the real pain, and the one a managed, openable session fixes.

§ 02 · The feature

A routine is just a Claude Code session that triggers itself.

Routines is an automation that launches a remote Claude Code session, defined by the prompt, the repos, the connectors, and a trigger. Claude Code handles the rest.

Three design commitments, each answering one of those pains.

Always available

Runs on managed infra

Routines run on Claude Code's managed infrastructure. The hosting and auth are handled, and nothing depends on your laptop staying open.

Proactive

Customizable triggers

Run on a schedule, or on an event. GitHub events work natively, and you can post your own to a webhook. The payload comes in as context.

Steerable

Interactive under the hood

Every routine is really a Claude Code session. You can open it, steer it, and pick it back up from web, CLI, or desktop, just like in the terminal.

FIG. 1 · Anatomy of a routinetrigger → managed session → work, with a human in the loop
TRIGGER MANAGED SESSION THE WORK SCHEDULE e.g. Mondays · 10:00 GITHUB EVENT issue opened · PR merged WEBHOOK your code POSTs a payload Claude Code session on Anthropic infra · hosting · state · auth DEFINED BY prompt repos connectors OPEN A PRe.g. update the docs REVIEW A PRcomment before a human PING / ALERTSlack · email · SMS You watch · steer · resume web · CLI · desktop
The trigger only decides when. The session is an ordinary Claude Code run on managed infrastructure, defined by a prompt + repos + connectors, and you can drop into it live the whole time it's working.
§ 03 · The method

Every routine is three decisions: trigger, context, steerability.

However elaborate the workflow, authoring a routine comes down to the same three questions. They're also the three fields the builder at the bottom asks you to fill.

Decision one
Trigger

When should it run?

  • Schedule. A cadence, like a weekly review of what changed against the docs.
  • Event. Fire on something happening, such as a release being cut, then diff that branch against the docs.
  • Labelled event. An engineer tags a merged PR needs-docs; that merge becomes the trigger.
Decision two
Context

What does it need to see?

  • Repos. Usually more than one: the source repo to read changes from, the docs repo to write a PR into.
  • Knowledge connectors. Want it to match house voice? Point it at the marketing briefs in Google Drive.
  • Side-effect connectors. Want a heads-up when it ships? Give it Slack so it can ping you.
Decision three
Steerability

How do you keep it honest?

  • Agent-on-agent review. One routine writes the PR; a second fires on PR-open to critique it before a human arrives.
  • Live human steering. Open the session on the web, ask mid-run, nudge it elsewhere, resume a past one.
  • Verify the artifact. Render the changed doc page and confirm the output is what you expected.
The generator/critic pattern, borrowed from multi-agent systems: one routine to do the work, another to mark it before you ever look.
§ 03 · on steerability
§ 04 · Worked example

The docs that couldn't keep up with the code.

Weekly PRs into Claude Code are up sharply this year. Maya puts the rise at roughly 200% since the start of the year. Good for the engineers shipping features. Hard on the one person keeping the docs for Claude Code and the Agent SDK in sync.

When Routines shipped she was an early adopter and set hers up from the terminal with /schedule. The starting prompt is roughly this. The builder below generates the same shape:

▌ /schedulea weekly docs-sync routine
Once a week, review every change merged to main against our documentation repo. If anything is out of sync, open a PR that updates the docs. Ping me on Slack when the PR is up.

From there Claude asks the follow-ups it needs: what time to run, how to notify you. It turns those answers and the prompt into a routine, with generated instructions you can read back. The result is two routines, one on a clock and one on an event.

Demo Aschedule

Weekly docs sync

  1. Wired to two repos (the Claude Code source fork and the docs repo), running every Monday at 10:00, connected to GitHub and Slack.
  2. The session reads its generated instructions, then scans the source repo for recently merged PRs.
  3. It diffs the changelog against the docs repo, finds the drift, and opens a PR to close it.
Demo Bgithub event

Issue-triggered docs gap

  1. A second routine fires on issue opened in the docs repo. Its brief: investigate the issue and decide whether it's a documentation gap.
  2. Open an issue, and a new run appears with the issue payload passed in as context alongside the standing instructions.
  3. Because a PR already exists, she steers it to stop mid-run from the web. Real-time control is always there.
What this shows

Same engine, two triggers. A clock and a GitHub event differ only in when they start the session. Either way you can open it and redirect it mid-run.

§ 05 · Patterns to steal

Three everyday chores, rewritten as routines.

The last section runs the same three questions over common engineering chores. Trigger, context, steering. Pick whichever fits and the builder below will draft it.

01

Deploy verifier

You just shipped a change to a service and want to know, quickly, whether to roll it back.

Trigger

Your CD pipeline already POSTs after every deploy, so wire that webhook straight to the routine.

Context

The service's source code, your monitoring (Datadog, Grafana, whatever you run), and an alert channel such as Slack, email, or SMS over Twilio.

Steerability

Start it as investigate-and-recommend: read its analysis on the web, then decide together whether to roll back.

The interesting part: a trust gradient
Stage 1It investigates and gives you a go / no-go.
Stage 2You co-pilot the rollback together.
Stage 3Once trusted, it rolls back on its own from the monitoring data.
02

On-call investigator

A page goes off; a first-pass investigation is waiting before a human is fully awake.

Trigger

Fire on the alert, an event post from your paging or monitoring stack.

Context

The relevant runbook, service repos, and telemetry tools.

Steerability

Have it triage and summarize first; you take over the moment it matters.

03

Backlog triage

A PM-shaped chore: a mountain of issues and channels nobody has time to read end to end.

Trigger

A weekly schedule, a standing Monday job.

Context

GitHub issues and the Slack channels where work actually shows up.

Steerability

It ranks by importance and drafts PRs for the few that matter most; you approve.

§ 06 · The bottom line

What you stop owning is the point.

Proactive beats reactive. Instead of waiting for you to press Enter and open the PR, it reacts to the problem and opens the PR itself.
Tool becomes teammate. It's the same Claude Code with a trigger and a window to watch it. That's enough for it to notice things on its own.
The infra is the part you hand off. Routines takes the hosting, the triggering, and the live view, so your attention goes to the work instead of the plumbing.
Starting is cheap. By the talk's account you're one /schedule command from your first routine. So pick the chore. The builder below turns it into one.
§ 07 · Build your own · the useful bit

File a work order for your new teammate.

The three questions, made concrete. Fill them in for a chore of your own and this compiles two things you can paste straight out: the /schedule prompt, and the verification task-block that says how you'll know it worked. Edit any field and both update live.

Routine · Work Order
DRAFT · REVIEW BEFORE FILING
Answer the three questions. You get a prompt and a verification block, both ready to paste. Nothing here leaves your browser.
THE CHOREWhat should it do?start with a verb
1 · TRIGGERWhen should it wake up?
2 · CONTEXTWhat can it see & reach?context is the ceiling
3 · STEERABILITYHow will you keep it honest?
▌ /schedule promptpaste into Claude Code
Every Monday at 10:00, your job is to keep our API docs in sync with the code, working across the source repo and the docs repo.
Investigate first and report back with a clear go / no-go. Don't take the action yourself. You can use GitHub and Slack. Ping me on Slack with anything that needs my eyes.
▌ verification task-blockhow you'll know it worked
Agent task: keep our API docs in sync with the code

Expected change:
- Change:        keep our API docs in sync with the code
- Do not change: anything outside the source repo and the docs repo
- Done means:    a go / no-go recommendation lands, with the evidence behind it

Cheap verifier:
- I will verify by:  reading its written recommendation and the specific signals it cites (< 2 min)

Evidence required:
- Proof:         its recommendation plus the exact signals it read

Residual risk:
- Remaining risk: a recommendation can be confident and wrong, so you still own the call
- Untested areas: anything outside the source repo and the docs repo; environments your connectors don't reach
- Owner:          me, the human who accepts the result
Live editing needs JavaScript. With it off, the two blocks above are a working example you can still copy and edit by hand.
The output is plain text on purpose, so you can read it before you trust it. A routine isn't done when it's filed. It's done when its verifier has run and a human owns the result.
// This document

FAH-ROUT-004
Don't Wait for Enter: field notes plus a work-order builder for Claude Code Routines.
Revised May 2026 to be good (craft) and useful (it ends in a tool), then edited for plainer, sharper language. One self-contained HTML file; opens by double-click.

// Set in

Fraunces (display & italic accents)
Spectral (body)
JetBrains Mono (labels, code, the work order)
Loaded once via Google Fonts. No other dependencies, no analytics, no storage.

// Source & additions

Build a proactive agent workflow with Claude Code, a Code with Claude talk by Maya, Applied AI at Anthropic, via the Claude YouTube channel. The talk's substance, examples, the 200% figure, and the docs-team story are the speaker's. The section framing, the two pull-quotes, the "trust gradient" label, and the work-order builder are editorial additions made here.