A2X← Back to A2XWorkshop resource
Code with Claude · Workshop Notes

From a tool
to a teammate.

Coding agents shouldn't wait for you to press enter. This is a walkthrough of Routines — the Claude Code feature that turns prompts into proactive agents that notice, decide, and act on their own.

01 — The core idea

A tool reacts. A teammate notices.

Today, Claude Code is a powerful tool: it waits for your prompt and your keystroke. The whole pitch of Routines is closing that gap — letting Claude initiate the work itself when something happens or some time passes.

Where we are

The Tool

  • Waits for you to type a prompt
  • Waits for you to press enter
  • Dies when your laptop closes
  • Acts only when summoned
Where we're going

The Teammate

  • Notices when something breaks
  • Kicks itself off on a trigger
  • Runs on managed infrastructure
  • Acts, then loops you in
02 — Why this was hard before

The infra tax on proactive agents

Running Claude Code on a cron is doable — but everyone who tried it ended up maintaining a pile of plumbing instead of writing prompts. Three problems showed up every time. Hover each one.

PAIN 01

Where does it run?

Not your laptop — close it and the session dies. So you're suddenly on the hook for hosting, data persistence, and authentication.

→ Routines run on managed infra. Nothing depends on your laptop being open.
PAIN 02

When does it fire?

You build on cron, or spin up endpoints to post to. Either way it's boilerplate you own and babysit forever.

Customizable triggers: schedules, native GitHub events, or your own webhooks.
PAIN 03

What's it doing?

A headless session is a black box. No way to watch, steer, bound, or resume what the agent is up to in real time.

→ Every routine is a real session you can open, watch, steer & resume.
03 — The feature

So, what is a Routine?

Definition

A routine is an automation where you kick off a remote Claude Code session by defining only four things — and Claude Code handles all the rest.

1 · The prompt 2 · The repos 3 · The connectors 4 · The trigger

Underneath, it's still just a Claude Code session — the same one you'd launch in your terminal — but always available, proactive, and fully steerable from web, CLI, or desktop.

04 — The mental model

Every routine is three decisions

Whatever you're automating, the design always reduces to the same three questions. Click through them.

Trigger

"When should this actually run?"

There are two flavors. A schedule runs on a cadence — like a weekly diff of source code against the docs repo. An event reacts to something happening — a release cut, a PR labeled needs-docs, or an issue opened.

⏱ Schedule · "every Monday 10am" ⚡ GitHub event · "on issue opened" ⚡ Webhook · "POST after deploy"

Context

"What does Claude need to know to succeed?"

This is the ceiling on how good the output can be — whatever context Claude has is the most it can work with. Give it the repos it must read and write, plus connectors for reference material and notifications.

📦 Source repo 📦 Docs repo 📁 Google Drive · briefs 💬 Slack · ping me 🐙 GitHub MCP

Steerability

"How do I keep Claude honest?"

Three levers. Set up agent-on-agent review (a generator routine creates a PR, a critic routine reviews it). Stay human-in-the-loop by opening the live session to nudge it mid-run. And always verify the output — render the page, confirm it's what you expected.

🤖 Generator → Critic pattern 👤 Watch & nudge live ✅ Verify the render
05 — Real example at Anthropic

Automating the docs nobody had time for

Claude Code's pull requests jumped — great for everyone except the one engineer keeping the docs in sync. She became an early Routines adopter. Here's the schedule-based routine she built.

+200%weekly PRs to Claude Code since the new year — and one overwhelmed docs maintainer
Type the prompt/schedule → "Once a week, review all new changes merged to main against the docs repo, and open a PR if anything is missing."
Answer Claude's questions"What time each week?" · "Want a Slack ping when I open a PR?" — answers become the routine's config.
Routine is bornRuns every Monday 10am · connected to source repo + docs repo · wired to GitHub & Slack.
Claude worksReads the changelog, diffs against existing docs, finds the gaps, and opens a PR — unprompted.
Human verifiesOpen the live session on the web, read what it did, render the changed page, confirm and merge.
claude code — ~/docs
$ /schedule
once a week, review new changes merged to main against
our docs repo and open a PR if you spot any gaps
Claude › What time each week should I run this?
Claude › Should I ping you on Slack when I open a PR?
✓ Routine created · Mondays 10:00 · #docs
06 — Try it · build a routine

Compose your own routine

Pick a trigger, the context Claude gets, and how you'll steer it. Watch the recipe assemble on the right — this is exactly the three-decision model in action.

⏱ Weekly schedule
⚡ GitHub issue opened
⚡ Webhook after deploy
⚡ PR labeled needs-docs
📦 Source repo
📦 Docs repo
📊 Monitoring
💬 Slack
📁 Google Drive
🤖 Agent-on-agent review
👤 Watch & nudge live
🧭 Go / no-go decision
your routine
Trigger— not set —
Context— not set —
Steering— not set —
07 — Apply it

Four routines worth stealing

Common engineering chores, recast through the three-decision lens. Notice each one is just trigger + context + steering.

08 — Check yourself

One quick gut-check

Your CD pipeline finishes a deploy and you want Claude to confirm the service is healthy before anyone goes to bed. Which trigger fits best?