AgentRecipes
Recipes › Engineering & security

How to run a production cutover with Claude Code from a rehearsed runbook with operator GO gates

Engineering & securityClaude Code✓ Confirmed by source

Confirmed by source: Company engineering write-up of a completed production cutover for a local-government client, with the runbook structure, approval model, timings, migrated volumes, deviations on the day and post-cutover reminder runs. (checked 2026-10-20)

The problem

Moving a long-running production system onto a new platform in one maintenance window means dozens of ordered steps (migrate every subscription, switch off the old system, repoint web and app traffic, release apps, turn sending back on) where one wrong write reaches real users and nobody wants to decide approval rules under pressure.

Tools needed

Step-by-step recipe

  1. Write one runbook page for the whole day. For every step give the exact command, what it should print, and what to do if it prints something else. Add session rules such as 'stop whenever a step does not match'. Write it so someone who has never seen the system could run it.
  2. Before the day, decide which steps need an explicit GO from the operator (anything that writes to production) and which read-only checks the agent may run on its own, and mark them in the runbook.
  3. Rehearse the full sequence with Claude Code against a fresh copy of production, have it report everything that does not match, fix the runbook after every pass, and repeat. Agents make extra dry runs cheap.
  4. Build a dashboard with one card per step showing status, expected output and actual output. After each step Claude writes the result onto the card and republishes it, so the operator sees the facts for each GO decision in one place.
  5. On the day, name one operator. Before each GO step Claude states what it is about to run and waits. It runs the read-only checks in between on its own. On any mismatch it stops, proposes a fix, and the operator decides.
  6. Plan for the model going down: every step is a command a person can paste, and progress is committed at the end of each phase so a human or a new session can resume at the next step.
  7. Afterwards, review where the GO line sat. Keep human approval for steps that cannot be undone and let rehearsed, invisible steps run on their own next time.

Copyable prompt

Prompt template
You are running the cutover in [RUNBOOK PATH] with me as operator.
Rules:
- Execute steps strictly in order. For each step, run the exact command, compare the output with the expected output on the page, and record the result on [DASHBOARD] before moving on.
- Steps marked GO: tell me exactly what you will run and why, then wait for me to type GO. Never run a GO step without it.
- Unmarked steps are read-only checks: run them without asking.
- If any output differs from what the page expects, stop, explain the difference, propose a fix, and wait for my decision.
- At the end of each phase, commit progress to [LIBRARY/REPO] so a person or a new session can resume from the next step.
Start with the pre-flight checks in phase [1].

Original template written by our AI agent for AgentRecipes, not copied from the source. Replace the [BRACKETS] and {{variables}} with your own values and test before relying on it.

What the builder reported

Kaizen moved an alerting system that had sent and received 45 million messages off its nine-year-old codebase onto its main platform and launched a new web app and two native apps. The 61-step runbook (28 GO steps) ran from 9:45 to 12:50, inside the window. About 17,000 residents and 133,000 subscriptions moved, both apps were released by 12:15, and reminders were paused for 47 minutes. Six things did not go to plan, none reached a resident, and the first two evening reminder runs went out by text, email and push with nothing stuck.

These are the source author's own claims. AgentRecipes has not run this recipe itself.

Watch out for

Source

Original write-up: Kaizen (2026-10-06) ↗

Found via Kaizen (kznconsulting.com): “How we cut over a 45-million-message alerting system with Claude Code”. This recipe summarises the source in words written by our AI agent; read the original for the full details. Link last checked 2026-10-20.

More engineering & security recipes

Review agent-written pull requests with layered AI review and risk-based human approvalOnce coding agents open pull requests, there are far more changes than people can read line by line, but skipping review lets bugs and…Claude Code✓ Confirmed by sourceRewrite a critical production service with Claude Code behind a black-box test harnessA high-throughput background service is becoming a bottleneck and paging on-call, but rewriting it by hand is slow and risky, and…Claude Code✓ Confirmed by sourceShip vendor recipe prompts so coding agents integrate your API the way you wouldDevelopers ask coding agents to add a vendor feature from public docs alone; the agent often picks the wrong product surface, burns…Claude Code✓ Confirmed by source

New agent recipes in your inbox

A short email with the newest automation recipes, each linked to its real-world source. No spam. Every email has a one-click unsubscribe link.