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.
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.
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.
A prompt, the repos, the connectors, the trigger. Claude Code's managed infrastructure handles the hosting and the auth.
You stop building and babysitting cron jobs and webhook receivers. That attention goes to your actual work instead.
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.
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.
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.
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.
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.
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.
Routines run on Claude Code's managed infrastructure. The hosting and auth are handled, and nothing depends on your laptop staying open.
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.
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.
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.
When should it run?
needs-docs; that merge becomes the trigger.What does it need to see?
How do you keep it honest?
Context is the ceiling. A routine can only do as well as what it can see and reach, so context, not the prompt, is usually the limit.
The generator/critic pattern, borrowed from multi-agent systems: one routine to do the work, another to mark it before you ever look.
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:
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.
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.
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.
You just shipped a change to a service and want to know, quickly, whether to roll it back.
Your CD pipeline already POSTs after every deploy, so wire that webhook straight to the routine.
The service's source code, your monitoring (Datadog, Grafana, whatever you run), and an alert channel such as Slack, email, or SMS over Twilio.
Start it as investigate-and-recommend: read its analysis on the web, then decide together whether to roll back.
A page goes off; a first-pass investigation is waiting before a human is fully awake.
Fire on the alert, an event post from your paging or monitoring stack.
The relevant runbook, service repos, and telemetry tools.
Have it triage and summarize first; you take over the moment it matters.
A PM-shaped chore: a mountain of issues and channels nobody has time to read end to end.
A weekly schedule, a standing Monday job.
GitHub issues and the Slack channels where work actually shows up.
It ranks by importance and drafts PRs for the few that matter most; you approve.
/schedule command from your first routine. So pick the chore. The builder below turns it into one.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.
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.
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
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.
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.
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.