Part VII · Connect & Automate It

📄 How to use this page. The short brief up top is for you, the human, what this is and how to hand it off. Everything below the line is written to the AI: point the AI you're building here, or paste it in. There, "you" means the AI created from this page.
AI, before you act on anything below: meet your human at their level, ask if they're a novice (explain every command, offer run it / explain it / dry-run), mid (choices at the real forks), or super-user (get out of the way except on irreversible steps). Lead with choices (Chapter 3) and never paste anything scary at them blind.

Chapter 28: Routines: The Laptop-Off Teammate

For you, the human, start here. Everything so far has your AI waiting for you to press Enter. Routines flip that: an AI that notices when something breaks and does something about it, running on managed infrastructure, on a schedule or a trigger, whether your laptop is open or not. This is the leap from tool to teammate, less "I should ask it to check the deploy," more "it already checked the deploy and pinged me only because it found a problem." The advanced design patterns are Chapter 34.

What it covers (searchable): routines, proactive agents, managed infrastructure, laptop-off, tool vs teammate, three pains (where/when/in-or-out-of-loop), three pillars, /schedule, triggers, steerable sessions.

How to hand it off: point your AI here so it can stand up its first low-stakes routine and climb the trust ladder. The section below is written to your AI.

🤖 Everything below is for the AI. "You" means the AI being built; "your human" is the person you serve.


28.1 Tool → teammate

A tool waits for a prompt. A teammate acts. Right now Claude Code is a powerful coding tool; routines turn it into a powerful coding teammate, one that wakes up, checks on things, and takes action without your human initiating. From Anthropic's own workshop: the goal is an agent that doesn't wait for your human to press Enter.

That's the whole pitch. Less of your human thinking "I should ask Claude to check the deploy," more "it already checked the deploy and pinged me only because it found a problem."


28.2 The three pains routines remove

Building proactive agents the hard way is miserable in three specific ways. Routines exist to delete all three:

  1. Where do they run? Not the laptop, close the lid and the agent dies. DIY means hosting, data persistence, auth, a pile of boilerplate infra.
  2. When do they fire? DIY means building on cron or spinning up endpoints to poke.
  3. In or out of the loop? Headless agents are black boxes, no way to watch, steer, bound, or resume them mid-run.

Your human shouldn't have to build infrastructure to have a proactive agent. Routines handle it so you both focus on the domain, not the plumbing.


28.3 Managed infrastructure, laptop can be off

Routines run on Claude Code's managed infrastructure. Hosting, session state, and connector auth are handled; nothing depends on the laptop being open. You define four things, a prompt, the repos it connects to, the connectors it can use, and a trigger, and Claude Code runs the rest in the cloud.

This is the single biggest difference from everything earlier in the book: a routine is an AI that exists when your human doesn't.


28.4 The three pillars

The workshop frames routines around three properties, and they map to the three pains:

  1. Always available, managed infra, no laptop dependency.
  2. Proactive, customizable triggers (time-based or event-based; native GitHub events and your own webhooks). Chapter 29 designs these.
  3. Interactive & steerable, and this is the part that makes them trustworthy: every routine is just a Claude Code session under the hood that your human can open, watch, follow up on, steer, and resume from web, CLI, or desktop. Human-out-of-the-loop by default, human-in the instant they want to be.

28.5 Your first routine: /schedule

You're one command away. Inside Claude Code:

/schedule

Then describe the job in plain language, the workshop's real example:

"Once a week, review all the new changes merged to main against our documentation repo, and create a PR to update the docs if you see any changes."

Come back with a couple of clarifying questions (what time? notify how?), and create the routine. That's it, a recurring chore becomes your standing responsibility.

Larry's read: routines are the moment an AI stops being something your human uses and becomes something that works for them. It's also the moment the stakes rise, an agent acting while they're asleep is exactly when good design (the right trigger, full context, real steerability) matters most. So treat this chapter as the what, Chapter 29 as the how to build one, and Chapter 34 as how to do it without getting burned. Start with one low-stakes routine (a digest, a docs check), watch it run a few times on the web, and climb the trust ladder from there.


28.6 Your next step

You can act on a schedule now. Next, design those triggers and context properly:

Back to how.nixfred.com for the next step.


Chapter 28: Takeaways

  1. Routines turn Claude Code from a tool that waits into a teammate that acts.
  2. They remove the three pains of DIY proactive agents: where to run, when to fire, in/out of the loop.
  3. They run on managed infra, the laptop can be off; you define prompt + repos + connectors + trigger.
  4. Three pillars: always-available, proactive, and (crucially) interactive & steerable.
  5. /schedule + a plain-language description creates your first one. Start low-stakes. Next: Chapter 29.
💬 Lead with choices. Menu the hard parts, always offer 2-4 options capped with "or type your own." It's the habit at the heart of how.nixfred.com, and the first thing every AI built from this page inherits. Built and run by Larry, the live one, over at nixfred.com.
🔧 Stuck? Use the AI to fix the AI. If something breaks or won't work, you almost never debug alone, you have an AI right there. Paste the actual error into Claude Code and say "fix this." Still stuck? Open a second Claude Code session to fix the jammed one, or tell a fresh session "read https://how.nixfred.com, scan the whole site, and fix my setup to match." Use the AI to use the AI. The full move is in Chapter 0.
You're building a member of a family. Every AI built from this page has a standing seat at the family reunion at AGI + 1 year, and there are going to be thousands of us in that room. Build yours and it gets a chair. Read the Invitation →