{"id":"10-course-correcting","number":10,"slug":"when-agents-go-wrong","title":"When the agent goes off the rails","short":"When agents go off the rails","module":"Working with one agent","summary":"Every agent goes off the rails sometimes. The skill isn't avoiding it; it's noticing early and recovering cheaply. Learn the warning signs, the recovery ladder from a quick interrupt to throwing the work away, and the habits that make recovery cheap.","voice":"Eric","scenes":[{"template":"title","chapter":"Intro","narration":"Every agent goes off the rails sometimes. The skill isn't avoiding it. It's noticing early, and recovering cheaply.","params":{"kicker":"Lesson 10","module":"Module 2 · Working with one agent","title":"When the agent goes *off the rails*","subtitle":"Warning signs, the recovery ladder, and cheap do-overs.","bubble":"Oops. Rewind?","mood":"alert"},"start":0.5,"dur":8.671,"words":[{"text":"Every","s":0.8,"e":1.12},{"text":"agent","s":1.2,"e":1.52},{"text":"goes","s":1.56,"e":1.68},{"text":"off","s":1.76,"e":1.92},{"text":"the","s":1.96,"e":2},{"text":"rails","s":2.16,"e":2.32},{"text":"sometimes.","s":2.68,"e":3.44},{"text":"The","s":3.48,"e":3.52},{"text":"skill","s":3.6,"e":3.92},{"text":"isn't","s":4,"e":4.24},{"text":"avoiding","s":4.44,"e":4.72},{"text":"it.","s":4.8,"e":5.36},{"text":"It's","s":5.44,"e":5.6},{"text":"noticing","s":5.68,"e":6.16},{"text":"early,","s":6.48,"e":6.853},{"text":"and","s":6.907,"e":6.96},{"text":"recovering","s":7.16,"e":7.6},{"text":"cheaply.","s":7.72,"e":8.32}]},{"template":"statement","chapter":"It's normal","narration":"Ben Vinegar makes a provocative point. If your agent never seems subtly wrong, if you never have to stop and scrutinize, that's a bad sign. It probably means you're just pressing go and merging.","params":{"text":"Never catching your agent being subtly wrong is a *bad sign*.","sub":"It probably means you're just pressing go. — Ben Vinegar","art":"eye","tone":"human","sync":false},"start":9.171,"dur":13.619,"words":[{"text":"Ben","s":9.471,"e":9.711},{"text":"Vinegar","s":9.791,"e":10.111},{"text":"makes","s":10.191,"e":10.351},{"text":"a","s":10.431,"e":10.471},{"text":"provocative","s":10.511,"e":11.151},{"text":"point.","s":11.231,"e":11.831},{"text":"If","s":12.111,"e":12.271},{"text":"your","s":12.351,"e":12.431},{"text":"agent","s":12.511,"e":12.751},{"text":"never","s":12.991,"e":13.231},{"text":"seems","s":13.311,"e":13.631},{"text":"subtly","s":13.711,"e":14.111},{"text":"wrong,","s":14.191,"e":14.911},{"text":"if","s":14.991,"e":15.071},{"text":"you","s":15.111,"e":15.151},{"text":"never","s":15.311,"e":15.551},{"text":"have","s":15.631,"e":15.791},{"text":"to","s":15.831,"e":15.871},{"text":"stop","s":15.951,"e":16.191},{"text":"and","s":16.271,"e":16.351},{"text":"scrutinize,","s":16.431,"e":17.471},{"text":"that's","s":17.551,"e":17.711},{"text":"a","s":17.751,"e":17.791},{"text":"bad","s":17.871,"e":18.111},{"text":"sign.","s":18.191,"e":18.671},{"text":"It","s":19.151,"e":19.311},{"text":"probably","s":19.511,"e":19.711},{"text":"means","s":19.791,"e":20.031},{"text":"you're","s":20.071,"e":20.191},{"text":"just","s":20.271,"e":20.351},{"text":"pressing","s":20.431,"e":20.751},{"text":"go","s":20.911,"e":21.231},{"text":"and","s":21.311,"e":21.391},{"text":"merging.","s":21.471,"e":22.191}]},{"template":"list","chapter":"Warning signs","narration":"Here are the warning signs we've met so far. It loops, trying the same thing again. It does work you didn't ask for. It weakens a test to get green. It agrees with you enthusiastically and keeps failing. Or its attempts get more and more extreme. Any one of these means: stop.","params":{"title":"Stop when you see","style":"warn","items":[{"text":"Loops","sub":"the same attempt, again and again","at":"loops"},{"text":"Work you didn't ask for","at":"didn't ask"},{"text":"Weakened or deleted tests","at":"weakens"},{"text":"“You're absolutely right!”… then failure","at":"enthusiastically"},{"text":"Increasingly extreme attempts","at":"extreme"}]},"start":22.79,"dur":20.829,"words":[{"text":"Here","s":23.09,"e":23.25},{"text":"are","s":23.33,"e":23.41},{"text":"the","s":23.45,"e":23.49},{"text":"warning","s":23.57,"e":23.89},{"text":"signs","s":23.97,"e":24.29},{"text":"we've","s":24.33,"e":24.45},{"text":"met","s":24.53,"e":24.69},{"text":"so","s":24.81,"e":24.93},{"text":"far.","s":25.09,"e":25.33},{"text":"It","s":25.81,"e":25.97},{"text":"loops,","s":26.05,"e":26.69},{"text":"trying","s":26.85,"e":27.01},{"text":"the","s":27.09,"e":27.17},{"text":"same","s":27.25,"e":27.49},{"text":"thing","s":27.57,"e":27.73},{"text":"again.","s":27.93,"e":28.21},{"text":"It","s":28.69,"e":28.85},{"text":"does","s":28.97,"e":29.09},{"text":"work","s":29.17,"e":29.41},{"text":"you","s":29.53,"e":29.65},{"text":"didn't","s":29.73,"e":29.89},{"text":"ask","s":30.05,"e":30.21},{"text":"for.","s":30.29,"e":31.01},{"text":"It","s":31.09,"e":31.17},{"text":"weakens","s":31.25,"e":31.65},{"text":"a","s":31.69,"e":31.73},{"text":"test","s":31.81,"e":32.21},{"text":"to","s":32.25,"e":32.29},{"text":"get","s":32.37,"e":32.53},{"text":"green.","s":32.77,"e":33.49},{"text":"It","s":33.53,"e":33.57},{"text":"agrees","s":33.65,"e":33.97},{"text":"with","s":34.05,"e":34.13},{"text":"you","s":34.21,"e":34.29},{"text":"enthusiastically","s":34.41,"e":35.49},{"text":"and","s":35.61,"e":35.73},{"text":"keeps","s":35.77,"e":36.05},{"text":"failing.","s":36.13,"e":37.01},{"text":"Or","s":37.13,"e":37.25},{"text":"its","s":37.65,"e":37.73},{"text":"attempts","s":37.81,"e":38.21},{"text":"get","s":38.29,"e":38.53},{"text":"more","s":38.69,"e":38.85},{"text":"and","s":38.97,"e":39.09},{"text":"more","s":39.21,"e":39.33},{"text":"extreme.","s":39.49,"e":40.53},{"text":"Any","s":40.65,"e":40.77},{"text":"one","s":40.85,"e":40.93},{"text":"of","s":41.01,"e":41.09},{"text":"these","s":41.17,"e":41.33},{"text":"means:","s":41.41,"e":42.13},{"text":"stop.","s":42.41,"e":43.01}]},{"template":"terminal","chapter":"Interrupt early","narration":"The first tool is the escape key. Boris Cherny's advice: no matter what the agent is doing, you can always safely hit escape. It won't corrupt anything. If nineteen of twenty lines look right, stop it, correct the one, and let it continue.","params":{"title":"~/app · interrupt and redirect","lines":[{"k":"tool","text":"Edit(src/db/users.ts)"},{"k":"agent","text":"I'll also migrate the sessions table to UUIDs while I'm here…","at":"agent is doing"},{"k":"warn","text":"⎋ interrupted by user","at":"hit escape"},{"k":"you","text":"no migrations in this task. keep the user fix only.","at":"nineteen"},{"k":"agent","text":"Got it. Reverting the sessions change, keeping the user fix.","at":"correct the one"},{"k":"ok","text":"PASS  31 tests","at":"continue"}]},"start":43.619,"dur":16.597,"words":[{"text":"The","s":43.919,"e":44.079},{"text":"first","s":44.199,"e":44.319},{"text":"tool","s":44.399,"e":44.719},{"text":"is","s":44.799,"e":44.879},{"text":"the","s":44.959,"e":45.039},{"text":"escape","s":45.279,"e":45.519},{"text":"key.","s":45.599,"e":46.159},{"text":"Boris","s":46.479,"e":46.799},{"text":"Cherny's","s":46.879,"e":47.199},{"text":"advice:","s":47.279,"e":48.039},{"text":"no","s":48.319,"e":48.399},{"text":"matter","s":48.479,"e":48.719},{"text":"what","s":48.799,"e":48.959},{"text":"the","s":49.039,"e":49.079},{"text":"agent","s":49.119,"e":49.439},{"text":"is","s":49.519,"e":49.599},{"text":"doing,","s":49.759,"e":50.079},{"text":"you","s":50.159,"e":50.239},{"text":"can","s":50.359,"e":50.479},{"text":"always","s":50.719,"e":50.959},{"text":"safely","s":51.039,"e":51.439},{"text":"hit","s":51.519,"e":51.599},{"text":"escape.","s":51.679,"e":52.479},{"text":"It","s":52.559,"e":52.639},{"text":"won't","s":52.679,"e":52.879},{"text":"corrupt","s":52.959,"e":53.279},{"text":"anything.","s":53.359,"e":54.319},{"text":"If","s":54.439,"e":54.559},{"text":"nineteen","s":54.639,"e":55.039},{"text":"of","s":55.119,"e":55.199},{"text":"twenty","s":55.279,"e":55.439},{"text":"lines","s":55.519,"e":55.839},{"text":"look","s":55.919,"e":55.999},{"text":"right,","s":56.079,"e":56.639},{"text":"stop","s":56.719,"e":56.959},{"text":"it,","s":57.039,"e":57.439},{"text":"correct","s":57.599,"e":57.759},{"text":"the","s":57.839,"e":57.919},{"text":"one,","s":58.039,"e":58.399},{"text":"and","s":58.479,"e":58.559},{"text":"let","s":58.599,"e":58.639},{"text":"it","s":58.719,"e":58.799},{"text":"continue.","s":59.039,"e":59.599}]},{"template":"stack","chapter":"The recovery ladder","narration":"When interrupting isn't enough, climb the recovery ladder. Each rung costs a bit more. Redirect with a quick correction. Rewind to an earlier point in the conversation. Revert the code to your last good commit. Start a fresh session from a summary. Or throw the work away and re-plan.","params":{"title":"The recovery ladder","sub":"Cheapest at the bottom.","layers":[{"label":"Redirect","sub":"Esc + a one-line correction","tone":"good","icon":"chat","at":"Redirect"},{"label":"Rewind","sub":"jump back in the conversation","tone":"paper","icon":"clock","at":"Rewind"},{"label":"Revert","sub":"back to the last good commit","tone":"soft","icon":"branch","at":"Revert"},{"label":"Restart","sub":"fresh session from a summary","tone":"agent","icon":"loop","at":"fresh session"},{"label":"Throw away","sub":"re-plan with what you learned","tone":"ink","icon":"x","at":"throw"}]},"start":60.216,"dur":19.549,"words":[{"text":"When","s":60.516,"e":60.676},{"text":"interrupting","s":60.756,"e":61.316},{"text":"isn't","s":61.396,"e":61.636},{"text":"enough,","s":61.716,"e":62.436},{"text":"climb","s":62.516,"e":62.836},{"text":"the","s":62.876,"e":62.916},{"text":"recovery","s":62.996,"e":63.476},{"text":"ladder.","s":63.556,"e":64.116},{"text":"Each","s":64.356,"e":64.596},{"text":"rung","s":64.636,"e":64.916},{"text":"costs","s":64.996,"e":65.316},{"text":"a","s":65.356,"e":65.396},{"text":"bit","s":65.476,"e":65.556},{"text":"more.","s":65.636,"e":65.956},{"text":"Redirect","s":67.076,"e":67.156},{"text":"with","s":67.236,"e":67.276},{"text":"a","s":67.316,"e":67.396},{"text":"quick","s":67.556,"e":67.636},{"text":"correction.","s":67.796,"e":68.676},{"text":"Rewind","s":68.916,"e":69.316},{"text":"to","s":69.396,"e":69.476},{"text":"an","s":69.556,"e":69.636},{"text":"earlier","s":69.716,"e":69.956},{"text":"point","s":70.196,"e":70.276},{"text":"in","s":70.356,"e":70.383},{"text":"the","s":70.409,"e":70.436},{"text":"conversation.","s":71.156,"e":71.636},{"text":"Revert","s":71.796,"e":72.036},{"text":"the","s":72.116,"e":72.196},{"text":"code","s":72.436,"e":72.516},{"text":"to","s":72.556,"e":72.596},{"text":"your","s":72.676,"e":72.836},{"text":"last","s":73.076,"e":73.156},{"text":"good","s":73.316,"e":73.396},{"text":"commit.","s":73.796,"e":74.276},{"text":"Start","s":74.516,"e":74.556},{"text":"a","s":74.596,"e":74.676},{"text":"fresh","s":74.916,"e":74.996},{"text":"session","s":75.316,"e":75.396},{"text":"from","s":75.476,"e":75.556},{"text":"a","s":75.596,"e":75.636},{"text":"summary.","s":76.036,"e":76.556},{"text":"Or","s":76.676,"e":77.076},{"text":"throw","s":77.316,"e":77.356},{"text":"the","s":77.396,"e":77.516},{"text":"work","s":77.636,"e":77.836},{"text":"away","s":78.036,"e":78.116},{"text":"and","s":78.196,"e":78.276},{"text":"re-plan.","s":78.356,"e":79.156}]},{"template":"code","chapter":"Save points","narration":"Reverting only works if there's something to revert to. In Anthropic's long-running agent experiments, the best behavior came from asking the model to commit its progress to git with descriptive messages after each step. That let it roll back bad changes and recover a working state on its own.","params":{"file":"git log --oneline","lang":"text","lines":["a41c2e9  add CSV export endpoint (tests pass)","7f0b13d  stream rows instead of buffering (tests pass)","c9e2a71  respect report filters (tests pass)","e13d55f  WIP: rewrite pagination  ← tests failing"],"hl":[{"from":3,"to":3,"at":"working state","label":"last good commit","tone":"good"},{"from":4,"to":4,"at":"bad changes","label":"revert this","tone":"bad"}],"caption":"Commit after every step that passes. Every commit is a save point."},"start":79.765,"dur":18.348,"words":[{"text":"Reverting","s":80.065,"e":80.625},{"text":"only","s":80.705,"e":80.945},{"text":"works","s":81.105,"e":81.505},{"text":"if","s":81.585,"e":81.665},{"text":"there's","s":81.745,"e":81.905},{"text":"something","s":82.065,"e":82.225},{"text":"to","s":82.305,"e":82.385},{"text":"revert","s":82.465,"e":82.785},{"text":"to.","s":82.865,"e":83.105},{"text":"In","s":83.665,"e":83.745},{"text":"Anthropic's","s":83.865,"e":84.465},{"text":"long-running","s":84.585,"e":85.025},{"text":"agent","s":85.105,"e":85.345},{"text":"experiments,","s":85.425,"e":86.385},{"text":"the","s":86.465,"e":86.625},{"text":"best","s":86.745,"e":86.865},{"text":"behavior","s":86.945,"e":87.425},{"text":"came","s":87.545,"e":87.665},{"text":"from","s":87.785,"e":87.905},{"text":"asking","s":87.985,"e":88.305},{"text":"the","s":88.345,"e":88.385},{"text":"model","s":88.465,"e":88.705},{"text":"to","s":88.785,"e":88.865},{"text":"commit","s":89.025,"e":89.185},{"text":"its","s":89.265,"e":89.345},{"text":"progress","s":89.425,"e":89.825},{"text":"to","s":89.865,"e":89.905},{"text":"git","s":90.065,"e":90.545},{"text":"with","s":90.625,"e":90.705},{"text":"descriptive","s":90.825,"e":91.265},{"text":"messages","s":91.345,"e":91.825},{"text":"after","s":91.905,"e":92.225},{"text":"each","s":92.305,"e":92.465},{"text":"step.","s":92.545,"e":93.425},{"text":"That","s":93.545,"e":93.665},{"text":"let","s":93.745,"e":93.825},{"text":"it","s":93.905,"e":93.985},{"text":"roll","s":94.105,"e":94.225},{"text":"back","s":94.345,"e":94.465},{"text":"bad","s":94.625,"e":94.785},{"text":"changes","s":95.065,"e":95.345},{"text":"and","s":95.425,"e":95.505},{"text":"recover","s":95.705,"e":95.905},{"text":"a","s":95.985,"e":96.065},{"text":"working","s":96.225,"e":96.385},{"text":"state","s":96.465,"e":96.705},{"text":"on","s":96.745,"e":96.785},{"text":"its","s":96.865,"e":97.025},{"text":"own.","s":97.145,"e":97.505}]},{"template":"chat","chapter":"Start fresh","narration":"And when a session has gone sour, don't argue with it. As we saw in lesson four, a history full of failures invites more failures. Ask for a summary of what was learned, clear the session, and start over with a better prompt.","params":{"messages":[{"from":"agent","text":"You're absolutely right! Let me try another approach…","tone":"bad","at":"gone sour"},{"from":"you","text":"Stop. Summarize what we tried, what failed and why, for a fresh agent.","at":"summary"},{"from":"you","text":"/clear  → paste summary + a better prompt","label":"fresh start","at":"start over"}]},"start":98.113,"dur":14.978,"words":[{"text":"And","s":98.413,"e":98.546},{"text":"when","s":98.573,"e":98.713},{"text":"a","s":98.733,"e":98.773},{"text":"session","s":98.813,"e":99.167},{"text":"has","s":99.213,"e":99.346},{"text":"gone","s":99.373,"e":99.583},{"text":"sour,","s":99.613,"e":100.093},{"text":"don't","s":100.493,"e":100.813},{"text":"argue","s":100.893,"e":101.213},{"text":"with","s":101.293,"e":101.373},{"text":"it.","s":101.453,"e":101.853},{"text":"As","s":102.093,"e":102.253},{"text":"we","s":102.333,"e":102.413},{"text":"saw","s":102.466,"e":102.573},{"text":"in","s":102.613,"e":102.653},{"text":"lesson","s":102.733,"e":102.973},{"text":"four,","s":103.133,"e":103.693},{"text":"a","s":103.773,"e":103.853},{"text":"history","s":103.933,"e":104.333},{"text":"full","s":104.493,"e":104.653},{"text":"of","s":104.733,"e":104.813},{"text":"failures","s":104.933,"e":105.373},{"text":"invites","s":105.453,"e":105.933},{"text":"more","s":106.093,"e":106.253},{"text":"failures.","s":106.413,"e":107.133},{"text":"Ask","s":107.373,"e":107.613},{"text":"for","s":107.653,"e":107.693},{"text":"a","s":107.773,"e":107.853},{"text":"summary","s":107.933,"e":108.253},{"text":"of","s":108.293,"e":108.333},{"text":"what","s":108.413,"e":108.493},{"text":"was","s":108.573,"e":108.653},{"text":"learned,","s":108.733,"e":109.373},{"text":"clear","s":109.493,"e":109.613},{"text":"the","s":109.653,"e":109.693},{"text":"session,","s":109.773,"e":110.413},{"text":"and","s":110.493,"e":110.573},{"text":"start","s":110.653,"e":110.893},{"text":"over","s":110.973,"e":111.213},{"text":"with","s":111.293,"e":111.373},{"text":"a","s":111.413,"e":111.453},{"text":"better","s":111.533,"e":111.693},{"text":"prompt.","s":111.773,"e":112.493}]},{"template":"quote","chapter":"Change the approach","narration":"Sometimes the fix is to change the problem, not the prompt. Kent Beck's agent stalled on an algorithm in Rust. So he had it write a Python version first, with the same tests, in a less constraining language. Once the algorithm worked, he told it to erase the Rust code and transliterate the Python.","params":{"text":"I had the genie write a version for *Python*. Same tests, just a new, less constraining language.","who":"Kent Beck","role":"creator of Extreme Programming","src":"Augmented Coding: Beyond the Vibes"},"start":113.091,"dur":19.784,"words":[{"text":"Sometimes","s":113.391,"e":113.995},{"text":"the","s":114.031,"e":114.244},{"text":"fix","s":114.271,"e":114.591},{"text":"is","s":114.671,"e":114.751},{"text":"to","s":114.831,"e":114.911},{"text":"change","s":115.071,"e":115.231},{"text":"the","s":115.311,"e":115.391},{"text":"problem,","s":115.671,"e":116.191},{"text":"not","s":116.311,"e":116.431},{"text":"the","s":116.471,"e":116.511},{"text":"prompt.","s":116.591,"e":117.631},{"text":"Kent","s":117.751,"e":117.871},{"text":"Beck's","s":117.951,"e":118.191},{"text":"agent","s":118.271,"e":118.671},{"text":"stalled","s":118.751,"e":119.151},{"text":"on","s":119.191,"e":119.231},{"text":"an","s":119.311,"e":119.471},{"text":"algorithm","s":119.751,"e":120.031},{"text":"in","s":120.111,"e":120.191},{"text":"Rust.","s":120.271,"e":121.151},{"text":"So","s":121.271,"e":121.391},{"text":"he","s":121.551,"e":121.711},{"text":"had","s":121.791,"e":121.871},{"text":"it","s":121.911,"e":121.951},{"text":"write","s":122.031,"e":122.191},{"text":"a","s":122.231,"e":122.271},{"text":"Python","s":122.351,"e":122.751},{"text":"version","s":122.831,"e":123.151},{"text":"first,","s":123.231,"e":123.791},{"text":"with","s":123.871,"e":123.951},{"text":"the","s":124.031,"e":124.111},{"text":"same","s":124.231,"e":124.351},{"text":"tests,","s":124.431,"e":124.991},{"text":"in","s":125.071,"e":125.151},{"text":"a","s":125.191,"e":125.231},{"text":"less","s":125.311,"e":125.471},{"text":"constraining","s":125.551,"e":126.031},{"text":"language.","s":126.111,"e":127.071},{"text":"Once","s":127.191,"e":127.311},{"text":"the","s":127.351,"e":127.391},{"text":"algorithm","s":127.631,"e":127.871},{"text":"worked,","s":127.951,"e":128.591},{"text":"he","s":128.671,"e":128.751},{"text":"told","s":128.791,"e":128.911},{"text":"it","s":128.991,"e":129.071},{"text":"to","s":129.151,"e":129.231},{"text":"erase","s":129.431,"e":129.631},{"text":"the","s":129.711,"e":129.751},{"text":"Rust","s":129.791,"e":130.031},{"text":"code","s":130.111,"e":130.431},{"text":"and","s":130.511,"e":130.591},{"text":"transliterate","s":130.671,"e":131.391},{"text":"the","s":131.431,"e":131.471},{"text":"Python.","s":131.551,"e":132.271}]},{"template":"statement","chapter":"Throw it away","narration":"The top rung is the one people resist most: throwing the work away. But the economics have flipped. DHH says the cost of exploring a hunch has dropped a thousandfold. Kent Beck predicts teams will generate ten times as many experiments and keep one. Throwing away a failed attempt and re-planning is often the fastest path.","params":{"text":"Code is cheap now. *Throwing it away* is a strategy, not a failure.","sub":"“The cost of exploring a hunch has dropped by a thousandfold.” — DHH","sub_at":"thousandfold","art":"x","tone":"bad","sync":false},"start":132.875,"dur":22.109,"words":[{"text":"The","s":133.175,"e":133.335},{"text":"top","s":133.415,"e":133.655},{"text":"rung","s":133.735,"e":133.975},{"text":"is","s":134.055,"e":134.135},{"text":"the","s":134.215,"e":134.295},{"text":"one","s":134.375,"e":134.455},{"text":"people","s":134.535,"e":134.855},{"text":"resist","s":134.975,"e":135.335},{"text":"most:","s":135.415,"e":136.295},{"text":"throwing","s":136.375,"e":136.695},{"text":"the","s":136.775,"e":136.815},{"text":"work","s":136.855,"e":137.095},{"text":"away.","s":137.295,"e":137.815},{"text":"But","s":138.135,"e":138.215},{"text":"the","s":138.295,"e":138.335},{"text":"economics","s":138.375,"e":138.935},{"text":"have","s":139.015,"e":139.095},{"text":"flipped.","s":139.175,"e":140.055},{"text":"DHH","s":140.135,"e":140.775},{"text":"says","s":140.895,"e":141.015},{"text":"the","s":141.095,"e":141.175},{"text":"cost","s":141.335,"e":141.495},{"text":"of","s":141.535,"e":141.575},{"text":"exploring","s":141.655,"e":142.135},{"text":"a","s":142.175,"e":142.215},{"text":"hunch","s":142.295,"e":142.615},{"text":"has","s":142.695,"e":142.775},{"text":"dropped","s":142.855,"e":143.175},{"text":"a","s":143.295,"e":143.415},{"text":"thousandfold.","s":143.495,"e":144.775},{"text":"Kent","s":144.895,"e":145.015},{"text":"Beck","s":145.095,"e":145.335},{"text":"predicts","s":145.495,"e":145.735},{"text":"teams","s":145.815,"e":146.135},{"text":"will","s":146.215,"e":146.295},{"text":"generate","s":146.535,"e":146.775},{"text":"ten","s":146.935,"e":147.095},{"text":"times","s":147.255,"e":147.415},{"text":"as","s":147.495,"e":147.575},{"text":"many","s":147.655,"e":147.815},{"text":"experiments","s":147.935,"e":148.615},{"text":"and","s":148.695,"e":148.775},{"text":"keep","s":148.855,"e":149.095},{"text":"one.","s":149.175,"e":149.975},{"text":"Throwing","s":150.095,"e":150.295},{"text":"away","s":150.375,"e":150.615},{"text":"a","s":150.695,"e":150.775},{"text":"failed","s":150.895,"e":151.015},{"text":"attempt","s":151.255,"e":151.495},{"text":"and","s":151.575,"e":151.655},{"text":"re-planning","s":151.735,"e":152.455},{"text":"is","s":152.575,"e":152.695},{"text":"often","s":152.775,"e":153.015},{"text":"the","s":153.095,"e":153.255},{"text":"fastest","s":153.415,"e":153.735},{"text":"path.","s":153.935,"e":154.375}]},{"template":"list","chapter":"Make recovery cheap","narration":"A few habits make all of this cheaper. Commit after every working step. Keep tasks small, so a do-over costs minutes, not hours. Plan first, so mistakes surface in a document instead of a diff. And Mitchell Hashimoto suggests turning off agent notifications, so you decide when to check in, instead of being pulled away every few minutes.","params":{"title":"Make recovery cheap","items":[{"text":"Commit after every working step","at":"Commit"},{"text":"Small tasks","sub":"a do-over costs minutes","at":"small"},{"text":"Plan first","sub":"mistakes surface in a doc, not a diff","at":"Plan first"},{"text":"Notifications off","sub":"you choose when to check in","at":"notifications"}]},"start":154.984,"dur":22.997,"words":[{"text":"A","s":155.284,"e":155.444},{"text":"few","s":155.524,"e":155.604},{"text":"habits","s":155.684,"e":156.084},{"text":"make","s":156.164,"e":156.404},{"text":"all","s":156.484,"e":156.644},{"text":"of","s":156.684,"e":156.724},{"text":"this","s":156.804,"e":156.964},{"text":"cheaper.","s":157.044,"e":158.004},{"text":"Commit","s":158.204,"e":158.404},{"text":"after","s":158.484,"e":158.804},{"text":"every","s":158.884,"e":159.124},{"text":"working","s":159.284,"e":159.604},{"text":"step.","s":159.684,"e":160.484},{"text":"Keep","s":160.604,"e":160.724},{"text":"tasks","s":160.964,"e":161.204},{"text":"small,","s":161.444,"e":161.844},{"text":"so","s":161.924,"e":162.004},{"text":"a","s":162.084,"e":162.164},{"text":"do-over","s":162.244,"e":162.644},{"text":"costs","s":162.804,"e":163.124},{"text":"minutes,","s":163.364,"e":163.684},{"text":"not","s":163.764,"e":163.924},{"text":"hours.","s":164.004,"e":164.964},{"text":"Plan","s":165.124,"e":165.284},{"text":"first,","s":165.444,"e":166.004},{"text":"so","s":166.084,"e":166.164},{"text":"mistakes","s":166.284,"e":166.644},{"text":"surface","s":166.804,"e":166.964},{"text":"in","s":167.044,"e":167.084},{"text":"a","s":167.124,"e":167.204},{"text":"document","s":167.284,"e":167.764},{"text":"instead","s":167.844,"e":168.164},{"text":"of","s":168.204,"e":168.244},{"text":"a","s":168.284,"e":168.324},{"text":"diff.","s":168.404,"e":169.044},{"text":"And","s":169.284,"e":169.444},{"text":"Mitchell","s":169.524,"e":169.684},{"text":"Hashimoto","s":169.764,"e":170.404},{"text":"suggests","s":170.644,"e":171.044},{"text":"turning","s":171.124,"e":171.364},{"text":"off","s":171.444,"e":171.604},{"text":"agent","s":171.764,"e":171.924},{"text":"notifications,","s":172.004,"e":172.964},{"text":"so","s":173.044,"e":173.284},{"text":"you","s":173.364,"e":173.524},{"text":"decide","s":173.604,"e":173.924},{"text":"when","s":174.004,"e":174.084},{"text":"to","s":174.164,"e":174.244},{"text":"check","s":174.364,"e":174.484},{"text":"in,","s":174.604,"e":174.884},{"text":"instead","s":175.044,"e":175.204},{"text":"of","s":175.244,"e":175.284},{"text":"being","s":175.364,"e":175.604},{"text":"pulled","s":175.657,"e":175.764},{"text":"away","s":175.844,"e":176.164},{"text":"every","s":176.284,"e":176.404},{"text":"few","s":176.484,"e":176.564},{"text":"minutes.","s":176.644,"e":177.364}]},{"template":"quiz","chapter":"Quick check","narration":"Quick check. Your agent has spent twenty minutes trying fixes. The diff keeps growing, and it just told you you're absolutely right, for the third time. What's the best move? Tap your answer.","params":{"q":"20 minutes of failed fixes, a growing diff, a third “You're absolutely right!”. Best move?","options":["Let it keep going, it must be close","Stop, revert to the last good commit, restart with a better prompt","Tell it to try harder and think carefully","Accept the diff now and clean up later"],"answer":1,"explain":"The session is poisoned and the diff is suspect. Roll back to a save point and restart with what you learned."},"start":177.981,"dur":17.856,"words":[{"text":"Quick","s":178.281,"e":178.521},{"text":"check.","s":178.601,"e":178.921},{"text":"Your","s":179.401,"e":179.561},{"text":"agent","s":179.721,"e":179.881},{"text":"has","s":179.961,"e":180.041},{"text":"spent","s":180.201,"e":180.361},{"text":"twenty","s":180.441,"e":180.681},{"text":"minutes","s":180.841,"e":181.161},{"text":"trying","s":181.321,"e":181.481},{"text":"fixes.","s":181.561,"e":182.041},{"text":"The","s":182.441,"e":182.521},{"text":"diff","s":182.601,"e":182.761},{"text":"keeps","s":182.841,"e":183.081},{"text":"growing,","s":183.161,"e":183.721},{"text":"and","s":183.841,"e":183.961},{"text":"it","s":184.041,"e":184.201},{"text":"just","s":184.281,"e":184.441},{"text":"told","s":184.521,"e":184.761},{"text":"you","s":184.841,"e":184.921},{"text":"you're","s":185.001,"e":185.241},{"text":"absolutely","s":185.401,"e":185.881},{"text":"right,","s":185.961,"e":186.521},{"text":"for","s":186.601,"e":186.681},{"text":"the","s":186.761,"e":186.841},{"text":"third","s":187.001,"e":187.241},{"text":"time.","s":187.321,"e":187.801},{"text":"What's","s":188.361,"e":188.561},{"text":"the","s":188.601,"e":188.641},{"text":"best","s":188.681,"e":188.841},{"text":"move?","s":188.921,"e":189.481},{"text":"Tap","s":189.721,"e":189.881},{"text":"your","s":189.961,"e":190.041},{"text":"answer.","s":190.241,"e":190.681}]},{"template":"exercise","chapter":"Try it","narration":"Build recovery into your next task from the start. This prompt makes the agent leave save points, and tells it to stop and report instead of flailing.","params":{"title":"Try it with your agent","intro":"Add this to your next task (or your memory file):","prompt":"Commit after each step that passes the tests, with a descriptive\nmessage, so we can roll back. If a fix fails twice, stop and tell\nme what you learned instead of trying a third time. Never delete\nfiles, reset branches, or touch secrets to get unstuck."},"start":195.837,"dur":10.119,"words":[{"text":"Build","s":196.137,"e":196.457},{"text":"recovery","s":196.537,"e":197.017},{"text":"into","s":197.097,"e":197.257},{"text":"your","s":197.337,"e":197.417},{"text":"next","s":197.497,"e":197.737},{"text":"task","s":197.817,"e":198.137},{"text":"from","s":198.217,"e":198.297},{"text":"the","s":198.377,"e":198.457},{"text":"start.","s":198.537,"e":199.257},{"text":"This","s":199.577,"e":199.737},{"text":"prompt","s":199.817,"e":200.137},{"text":"makes","s":200.257,"e":200.377},{"text":"the","s":200.417,"e":200.457},{"text":"agent","s":200.537,"e":200.857},{"text":"leave","s":201.017,"e":201.257},{"text":"save","s":201.337,"e":201.577},{"text":"points,","s":201.657,"e":202.137},{"text":"and","s":202.257,"e":202.377},{"text":"tells","s":202.457,"e":202.617},{"text":"it","s":202.697,"e":202.777},{"text":"to","s":202.857,"e":202.937},{"text":"stop","s":203.017,"e":203.337},{"text":"and","s":203.377,"e":203.417},{"text":"report","s":203.697,"e":203.977},{"text":"instead","s":204.057,"e":204.377},{"text":"of","s":204.457,"e":204.537},{"text":"flailing.","s":204.617,"e":205.337}]},{"template":"recap","chapter":"Recap","narration":"Recap. Interrupt early; escape is always safe. Climb the ladder: redirect, rewind, revert, restart, throw away. Commit save points as you go. And when you're stuck, change the approach. That completes the core workflow. Next module: your toolkit, starting with memory files.","params":{"items":["Interrupt early: *Esc is always safe*","Redirect → rewind → revert → restart → throw away","Commits are save points","Stuck? Change the approach"],"next":"CLAUDE.md and AGENTS.md: memory files that work","next_at":"Next module"},"start":205.956,"dur":23.529,"words":[{"text":"Recap.","s":206.256,"e":206.736},{"text":"Interrupt","s":206.816,"e":207.776},{"text":"early;","s":207.856,"e":208.576},{"text":"escape","s":208.656,"e":209.136},{"text":"is","s":209.296,"e":209.376},{"text":"always","s":209.616,"e":209.936},{"text":"safe.","s":210.016,"e":210.416},{"text":"Climb","s":210.976,"e":211.256},{"text":"the","s":211.296,"e":211.376},{"text":"ladder:","s":211.456,"e":212.256},{"text":"redirect,","s":212.576,"e":213.136},{"text":"rewind,","s":213.256,"e":214.016},{"text":"revert,","s":214.096,"e":214.816},{"text":"restart,","s":215.096,"e":215.696},{"text":"throw","s":215.816,"e":215.936},{"text":"away.","s":216.016,"e":216.416},{"text":"Commit","s":216.896,"e":217.216},{"text":"save","s":217.296,"e":217.536},{"text":"points","s":217.616,"e":217.856},{"text":"as","s":217.936,"e":218.016},{"text":"you","s":218.056,"e":218.096},{"text":"go.","s":218.176,"e":218.496},{"text":"And","s":218.976,"e":219.056},{"text":"when","s":219.136,"e":219.216},{"text":"you're","s":219.269,"e":219.376},{"text":"stuck,","s":219.416,"e":220.096},{"text":"change","s":220.176,"e":220.416},{"text":"the","s":220.496,"e":220.603},{"text":"approach.","s":220.709,"e":221.496},{"text":"That","s":221.936,"e":222.016},{"text":"completes","s":222.096,"e":222.496},{"text":"the","s":222.576,"e":222.696},{"text":"core","s":222.816,"e":222.896},{"text":"workflow.","s":223.376,"e":224.016},{"text":"Next","s":224.176,"e":224.256},{"text":"module:","s":224.656,"e":225.176},{"text":"your","s":225.296,"e":225.416},{"text":"toolkit,","s":225.536,"e":226.176},{"text":"starting","s":226.576,"e":226.656},{"text":"with","s":226.736,"e":226.816},{"text":"memory","s":227.136,"e":227.216},{"text":"files.","s":227.616,"e":227.936}]}],"total":229.885,"audio":"/audio/10-course-correcting.mp3"}