1. Home
  2. Free course
  3. Module 5

Watch the run.
Step in on purpose.

A run is not a black box you wait outside. This module teaches you to read an agent while it works, decide when to interrupt and when to let it finish, and change its course without throwing away what it has already done.

Module 5 of 8About 35 minPractice

What you will be able to do

  • Spot the five signals that a run is drifting, from the trace rather than the final reply.
  • Decide in seconds whether to interrupt, queue a correction or let the agent finish.
  • Get a plan before the first edit on any task you could not undo with one command, and review it properly.
  • Recover from a wrong path by redirecting, rewinding or restarting, and know which one fits.
  • Set up a long unattended run so that you can check it in two minutes when you come back.

Modules 1 to 4 were about what happens before and after the work: the brief, the context, the split and the proof. Steering is what you do in between. The agent is running, the clock is ticking, and you have to decide whether to watch, wait or act. Most operators either stare at every line or walk away entirely. Both are expensive. The skill is knowing which moments matter.

5.1 Read the run as it happens

An agent's final reply is a summary written by the agent about its own work. The trace is the record of what it actually did: every file it read, every command it ran, every edit it made, and every result that came back. When you steer, you read the trace.

You do not need to read every line. You need to scan for a short list of signals, the way a driver scans mirrors without staring at them. These five cover most runs that go wrong:

  1. The same failure, three times. A test fails, the agent edits, the same test fails with the same message. After the third round it is guessing, and each guess makes the diff bigger.
  2. Files outside the scope. The brief said "checkout only" and the agent has just opened the payment provider config. A read can be research; an edit is drift.
  3. The goalposts move. The agent edits a test so that it passes, loosens an assertion, adds a skip, or catches and ignores an error. The check that was meant to prove the work now proves nothing.
  4. "Let me try a different approach." Once is healthy. Three new approaches in ten minutes means the agent has lost the model of the problem, and more attempts will not bring it back.
  5. A risky action is coming. A migration, a push, a deletion, a message to a real person. These are the moments where watching pays for itself; module 6 shows how to make the harness stop there for you.

Where to look

Every harness shows the trace differently. In Claude Code, Ctrl+O toggles the transcript viewer, which shows detailed tool usage with a timestamp and the model used on each message, and Ctrl+T shows or hides the agent's task checklist (interactive mode reference). The checklist is the fastest read of all: if the agent's own plan says "3 of 7" after an hour, you know something before you open a single file.

Here is a trace that looks busy and productive, and is actually in trouble:

● Bash(npm test -- checkout)
  ✗ applies promo code: expected 90, received 100
● Edit(src/checkout/total.ts)        +4 −1
● Bash(npm test -- checkout)
  ✗ applies promo code: expected 90, received 100
● Read(src/payments/provider.config.ts)
● Edit(src/checkout/total.ts)        +11 −3
● Bash(npm test -- checkout)
  ✗ applies promo code: expected 90, received 100
● Edit(tests/checkout.test.ts)       +1 −1
  - expect(total).toBe(90)
  + expect(total).toBeLessThanOrEqual(100)

Three signals in nine lines: the same failure three times, a read outside the scope, and a loosened assertion. The reply at the end of this turn will almost certainly say "tests pass". It will even be true. The right moment to step in was the second identical failure, before the test was weakened.

Watch at the right density

Match how closely you watch to how much a mistake would cost. A docs sweep in a branch can run while you do something else. The first ten minutes of a task in unfamiliar code deserve your full attention, because that is when the agent forms its picture of the problem, and a wrong picture formed early drives every later step. After it has shown you it understands the code, you can widen the gaps between looks.

The common mistake: reading only the final reply. The reply is where the agent explains itself, and it is written with full confidence whether the work went well or not. If you read nothing else, read the last three tool calls and their results.

Spot the drift

Open the transcript of your last long session (in Claude Code, press Ctrl+O, or open the session log your harness writes). Find the first moment one of the five signals appeared. Write down the step number, and the step where you actually noticed. The gap between the two is what this module is about.

5.2 Interrupt or let it finish

Interrupting has a cost. The agent loses its train of thought, a half-finished multi-file edit can leave the code in a state that does not build, and you spend your own attention. Letting it run also has a cost: every step down a wrong path is a step you pay for and then pay again to undo. The decision is a comparison, and it can be made quickly.

What you seeWhat to doWhy
Wrong target: it is fixing the wrong bug, or building the wrong featureInterrupt nowNothing it does from here is useful. Every step adds work to undo.
An irreversible step is nextInterrupt nowYou cannot review afterwards what you cannot undo.
The same failure for the third timeInterrupt nowIt is guessing. Give it information, not more time.
Right direction, but a detail you would changeQueue a noteA note waits for a natural break and keeps the work going.
Ugly but correct, inside scopeLet it finishPolish it after the checks pass. Stopping now trades a finished rough version for an unfinished one.
Mid-way through a change across many filesLet it reach a build, then step inStopping half-way leaves code that does not compile and is harder to judge.

Interrupt and queue are different tools

Most harnesses give you two ways in. One stops the agent. The other leaves a message it will pick up at the next natural break. In Claude Code, Esc stops the current response or tool call mid-turn so you can redirect, and the work done so far is kept. Typing a message and pressing Enter while the agent is working queues it instead: the message is passed to the agent as soon as the current tool calls finish, within the same turn (queue messages while Claude works). If you queued messages and then press Esc, they are sent next.

Use the queue for anything that can wait thirty seconds. It is cheaper and it does not break a sequence of edits. Use the stop for the first three rows of the table above, where every extra second is a second of damage.

# queued while the agent runs tests, no interrupt needed
> When you're done with this test run: keep the promo code in the URL
  as well, so a shared link applies it. Same checks as the brief.

# pressed Esc first, because the next step was a schema change
> Stop. Don't run the migration. Show me the SQL it would run and
  which tables it touches. I'll approve it myself.

The common mistake: interrupting out of impatience. An agent that is reading ten files before it edits one is doing what you want. Silence is not the same as being stuck. Check the trace: if the tool calls are moving through different files and the results are new, it is working.

Classify five moments

On your next real task, every time you feel the urge to type something, stop and name which row of the table you are in before you act. Note whether you would have interrupted when a queued note was enough. Five moments are enough to show you your own habit.

5.3 Ask for a plan first

The cheapest place to steer is before the first edit. A plan costs a few minutes of reading and exposes most wrong paths while they are still words. Any task that touches more than a handful of files, changes data, or has a step you could not undo with one command deserves a plan you have read.

Harnesses offer this as a mode. In Claude Code, plan mode tells the agent to research and propose changes without making them: it reads files, runs shell commands to explore and writes a plan, but does not edit your source until you approve. You enter it with Shift+Tab, by prefixing a single prompt with /plan, or by starting with claude --permission-mode plan (permission modes). When the plan is ready you approve it into a mode that accepts edits, approve it with each edit reviewed by hand, or say "No, keep planning" and tell it what to change. Ctrl+G opens the plan in your text editor so you can change it before work starts. In Codex CLI, the nearest equivalent is the read-only sandbox, where the agent reads files and runs commands but cannot write (Codex approvals and security). In any harness, you can simply ask: "Before you change anything, write the plan and wait."

What a plan worth approving contains

  • Named files. "Update the checkout logic" is a wish. "Edit src/checkout/total.ts and src/checkout/promo.ts, add tests/promo.test.ts" is a plan.
  • An order. What comes first, and why. Schema before code, tests before refactor, the risky step last or isolated.
  • The checks. Which command proves each step. These should match the "done means" from your brief (module 1).
  • Risks and unknowns. What it is not sure about. A plan with no unknowns in unfamiliar code is a plan that has not looked hard enough.
  • What it will not touch. The plan should repeat your scope back. If it does not mention the payment config, ask.

How to review it in three minutes

  1. Read the file list first. Anything you did not expect is either a discovery or a drift. Ask which.
  2. Find the riskiest step. Ask how it will be checked and how it would be undone.
  3. Find the step you would have done differently. Say so now, in one sentence, while it costs nothing.
> No, keep planning. Two changes:
  1. Don't add a new PromoService class. Put the lookup in promo.ts
     next to the existing validateCode().
  2. Step 4 runs the migration against the dev database. Write it,
     don't run it. I'll run it.

The common mistake: approving a plan you skimmed. A plan you did not read is worse than no plan, because now the agent believes you agreed to it, and it will defend it later. If the plan is too long to read, the task is too big for one run; go back to module 3 and split it.

Plan before code, once

Take a task you would normally hand straight to the agent. Ask for a plan first and do not approve the first version: find one thing to change, even a small one, and send it back. Then compare the finished run with your usual ones. Count how many corrections you needed after the first edit.

5.4 Redirect, rewind or restart

When a run has gone wrong, you have three ways back. Pick the cheapest one that leaves the agent with a correct picture of the problem.

Redirect: one correction, stated as a fact

Most wrong paths can be fixed in place. The agent has read the right files and holds most of the right picture; one fact is wrong. Give it that fact. A good redirect has four parts: what you saw, what is actually true, the constraint it must keep, and the next step you want.

> You've changed total.ts three times and the test still gets 100.
  The discount isn't applied because applyPromo() runs before the cart
  is loaded: see the order in src/checkout/index.ts, line 40.
  Keep the test exactly as the brief wrote it.
  Next: move the promo step after loadCart() and run the test once.

Compare that with "no, that's wrong, try again". The weak version tells the agent only that it failed, which it already knew. It will try another guess. The strong version replaces a guess with a fact and fences off the shortcut it was about to take.

Rewind: go back to before the wrong turn

Sometimes the wrong path has left too much behind: edits you do not want, and a conversation full of failed attempts that the agent keeps referring back to. Then rewind. In Claude Code, /rewind, or Esc twice on an empty prompt, opens a menu of your earlier prompts. You can restore the code and the conversation, only the conversation, or only the code, or summarise from a point onwards to free context (checkpointing). Restoring the conversation puts your original prompt back in the input, so you can send it again with the fact that was missing.

Know the limits before you rely on it. Checkpoints track edits made by the agent's file tools. A file that only shell commands changed is not tracked and stays as it is. Edits made by subagents are usually not restored either. Changes outside your machine, such as a push, a sent message or a database row, cannot be rewound by any harness. The docs say it plainly: checkpoints are for quick, session-level recovery and are not a replacement for version control. Commit before risky work and you always have a second way back.

Restart: a fresh session with a better brief

Restart when the context itself is the problem. After a long fight, the conversation is full of wrong hypotheses, and the agent reasons from them. A new session that starts from a sharper brief, with what you learned written into it, often finishes faster than the old session would have. The test: if you would have to correct more than two beliefs the agent now holds, restart.

/brief Promo codes in checkout. Known from the last attempt:
  - applyPromo() must run after loadCart() (src/checkout/index.ts:40)
  - the provider config is not involved; don't open it
  - the test in tests/checkout.test.ts is the check; don't edit it

If you want to try another route without losing the current one, branch instead of restarting. Claude Code offers /branch, or claude --continue --fork-session, to try a different approach while the original session stays intact.

The common mistake: stacking corrections. Five messages of "also", "and", "actually" leave the agent holding several partly contradictory instructions, and it will pick one. One clear redirect beats five patches. If you need five, you need a restart.

Rewrite a weak redirect

Find a correction you typed last week that was shorter than ten words ("no, wrong file", "that's not it"). Rewrite it with the four parts: what you saw, what is true, the constraint, the next step. Keep the rewrite as a template; you will type it again.

5.5 Long unattended runs

The point of an agent is that it can work while you do something else, including sleep. An unattended run is steering done in advance: you make the decisions you would have made while watching, and you write them into the setup before you leave.

Before you walk away

  1. A brief with checks the agent can run. Unattended, nobody answers "is this what you meant?" The "done means" list is the only judge. Write commands, not adjectives.
  2. An isolated place to work. A branch or a git worktree, so a bad run costs you a git branch -D, not an afternoon. Claude Code can start a session in its own worktree with --worktree.
  3. Questions it can answer without you. An agent that stops to ask at 2 a.m. waits until 8 a.m. Say in the brief what to do when unsure: "pick the option that changes fewer files and note it under Assumptions".
  4. Permissions that never prompt. A prompt with nobody there is a stall. Pre-approve what it needs and deny the rest. In Claude Code, the dontAsk mode denies every call that would otherwise prompt, and permissions.denyInsteadOfPrompting does the same within your current mode, so an unattended session keeps working instead of waiting (permissions). Module 6 covers the rules themselves.
  5. A limit. For non-interactive runs, Claude Code's print mode takes --max-turns to cap agentic turns and --max-budget-usd to stop once estimated spend reaches an amount (CLI reference). The budget is checked against a client-side estimate and spend can pass it, so leave headroom. Module 8 covers budgets in depth.
git worktree add ../shop-promo -b feat/promo
cd ../shop-promo
claude -p "$(cat brief.md)" \
  --permission-mode dontAsk \
  --allowedTools "Read" "Edit" "Bash(npm test *)" "Bash(git commit *)" \
  --max-turns 60 \
  --output-format json > run.json

When you come back: two minutes, in this order

  1. State, not story. Run the checks yourself: git log --oneline, git status, the test command from the brief. This takes a minute and tells you the truth.
  2. The last few tool calls. Did it end because it finished, because it hit a limit, or because something was denied? Each needs a different next step.
  3. Only then the summary. Now the agent's account has something to be checked against. Read the Assumptions it made and veto any you disagree with.

If you run many sessions at once, you need one place to see which have finished, which are waiting and which are still going. The HOPE console reads the logs your harnesses already write and shows each session's status, tasks, tools and cost in one view. The free skills add /summary, which answers "where are we?" from a checkpoint checked against live git, and /summary all for every project at once.

The common mistake: leaving with permissions that will prompt. You come back eight hours later to a session that stopped in minute four, waiting for a yes to npm install. Do a two-minute supervised start: watch the first few tool calls, confirm none of them asks, then leave.

A one-hour run you do not watch

Pick a contained task: a test suite for an untested module, or a docs sweep. Set it up with the five steps above and leave for an hour. When you return, do the two-minute check in order, and write down what you checked first. If you read the summary first, do it again next time the other way round.

Practice task

Run one real task of 30 to 90 minutes on your own harness, in a repository you know, and steer it deliberately. A good candidate is a feature that touches three to six files and has at least one test you can run.

  1. Write a brief with "done means" checks (module 1), then ask for a plan before any edit.
  2. Send the plan back at least once with a concrete change.
  3. While it runs, keep a short log beside the session: the time, what you saw, and whether you waited, queued a note, interrupted, rewound or restarted.
  4. For the last third of the run, leave it alone, then come back and do the two-minute check in order.

Success criteria

  • The plan you approved names files, an order and the checks, and differs from the first draft in at least one point you asked for.
  • Your log has at least four entries, each with the signal you saw and the action you chose.
  • At least one correction was queued rather than an interrupt, and you can say why that was enough.
  • Every redirect you sent states a fact, not just "wrong".
  • On return, you checked git state and ran the brief's checks yourself before reading the agent's summary.
  • The result passes every "done means" check, and the transcript shows no weakened test.

Check yourself

The agent has failed the same test twice with the same message and is about to edit again. What do you do?

Interrupt and give it information. Two identical failures mean its model of the problem is wrong; another edit is another guess. Tell it what you know, or ask it to print the values it is assuming before it changes any code.

When is a queued message better than an interrupt?

When the direction is right and the correction can wait until the current tool calls finish: a detail, an extra requirement, a preference. Queueing keeps a sequence of edits intact. Interrupt when the target is wrong, an irreversible step is next, or it is looping.

Name three things a plan should contain before you approve it.

Any three of: the files it will change, the order of the steps, the check that proves each step, the risks or unknowns, and what it will not touch.

You rewound the code to before a bad change, but one file is still wrong. Why might that be?

Checkpoints track edits made by the agent's file tools. A file changed only by shell commands is not tracked, and edits by subagents are usually not restored. Use version control for those, which is why you commit before risky work.

You come back to a run that worked all night. What do you check first, and why?

The real state: git log and status, and the brief's checks run by you. The summary is the agent's account of its own work; it only means something once you have something to check it against.

Key takeaways

  • Steer from the trace, not the reply. Five signals catch most drift: repeated failure, out-of-scope files, moved goalposts, approach churn and a risky next step.
  • Interrupt for the wrong target, an irreversible step or a loop. Queue for everything that can wait thirty seconds. Let correct-but-ugly work finish.
  • The cheapest correction is to a plan. Read it, change one thing, then approve.
  • Redirect with a fact. Rewind when the code or conversation took a wrong turn. Restart when the agent holds too many wrong beliefs.
  • An unattended run is steering done in advance: checkable brief, isolated branch, permissions that never prompt, a limit, and a two-minute check on return.

Go further

  • Module 4, Verification: what to check when the run ends.
  • Module 6, Guardrails: make the harness stop at the risky step so you do not have to be watching.
  • Module 8, Economics: when to stop a run because it costs more than it is worth.
  • Free skills: /brief, /checkpoint and /summary make plans and returns faster.
  • Training: the guided version of this module, practised on a live harness with your transcript reviewed against an expert run.
  • Certification: every exam is a live task on a real harness, graded on the transcript, the evidence and the result.