Claude Code In Action
← All lessons
Lesson 108Claude Code In Action

Trust it verifying unsupervised runs

Summary audio

No audio recap for this lesson.

Study notes

Core Principle

  • When you hand off work to cloud without supervision, you need a proportional verification strategy before shipping
  • The less supervised the run, the more rigorous the check must be

Verification Levels

  • Watched runs (you see messages in real-time): needs only a glance
  • Unattended runs (CI/CD, background jobs): needs a real check
  • Keep unattended runs in auto mode with permissions intact—the classifier still reviews for danger

What to Check

Start with the Diff

  • Read the actual code changes, not just cloud's summary
  • Examine files that weren't in the original plan first
  • Watch for unexpected file modifications hidden in tidy summaries
  • Use git diff directly and run code review tools

Test Execution

  • Verify tests actually ran, don't assume cloud ran them
  • Wire tests as hooks so cloud cannot skip them
  • Use stop hooks (refuse to proceed on failure) or post-tool-use hooks (lint/type-check after edits)
  • Hooks that exit with code 2 feed failures back to cloud for automatic fixes

Get a Cold Second Opinion

  • Use a subagent code review on unsupervised runs
  • Fresh session with no memory of how code was built
  • Catches issues the original run rationalized past
  • Essential for high-stakes changes

Implementation

  • Make verification rigor match the level of supervision
  • Automate checks so they run every time, not just when remembered
  • Verify headless runs by their JSON results
  • Transform "cloud did it while I wasn't looking" from faith into verified fact

Takeaways

  • Verification rigor must match supervision level—unsupervised cloud runs need proportionally more rigorous checks than watched runs
  • Always read the actual code diff directly and examine unexpected files first, rather than trusting cloud's summary
  • Wire tests as hooks so cloud cannot skip them, and use exit code 2 to feed failures back for automatic fixes
  • Use a fresh subagent code review on unsupervised runs to catch issues the original run rationalized past
  • Automate all verification checks so they run every time, transforming unsupervised cloud work from faith into verified fact
Flashcards 8 cards
Question
click to reveal · ←/→
Answer
click to flip back
Export to Anki (.tsv) ↓
Knowledge check 6 questions