Docs/Get started/Step 4: Steer a wrong turn
Get started

Step 4: Steer a session that is going wrong

6 min read

Step 4 of 17The whole pathThe next step is being written.

The agent has been working for ten minutes and it is confidently doing the wrong thing - the wrong files, the wrong approach, or a careful answer to a question you never asked. Closing it down and starting again is the expensive reflex. Almost every one of these is recoverable, usually in one sentence.

Look just above the message box you typed in during the previous step, The prompt bar is not the terminal. There is a row of small buttons there - Stop in dark red, then Interrupt, Compact, Clear context and History. That is the action bar, and it is a ladder: the buttons on the left end a turn, the ones in the middle operate on the conversation itself, and the further right you reach the more you throw away. Take the lowest rung that works.

Six minutes. You need DevThrottle open with one session working on something real, so there is output to read.

  1. Read it for thirty seconds before you touch anything

    Click the session and read the terminal. Agents narrate as they work, so it usually says not just what it is doing but why - and a surprising route is not the same thing as a wrong destination. An agent opening files you never mentioned is often just working out where things are. Interrupting one that was fine costs you the minutes it needs to find its place again.

    What you are looking for is a wrong goal, not a wrong step: it is solving a problem you do not have, editing something you asked it to leave alone, or explaining at length instead of doing. Any of those, act. Otherwise leave it be and come back in a minute.

  2. Stop it, mildly first

    Stop is the mild brake. It presses the agent's own soft cancel - the Esc you would press yourself if you were sitting in the bare command-line tool. The current turn ends there and then, and nothing else changes: the conversation is intact, the agent still remembers the task and everything it has read, and your files are exactly as they were a second ago.

    Watch the bar rather than the terminal while you click. The button greys out and reads back to you - stopping..., then turn stopped - and the note clears itself a few seconds later. That small line exists because this is the one button people click three times in a row: a second click while the first is still running is ignored, so an agent that takes a moment to let go is not a reason to keep pressing.

    If it genuinely will not let go, Interrupt is the hard version - the Ctrl+C a terminal has always understood. Reach for it when Stop bounced off, not before. Neither button asks you to confirm; both are meant to be pressed the instant you decide.

  3. Say what you actually wanted

    Most steering ends here, and it is worth seeing why. After Stop, the conversation is whole. So do not re-explain the task from the beginning - just correct it, in the message box, and name both halves: what to abandon and what to do instead. "Stop rewriting the parser - the job was only to add the new date format, leave everything else alone" lands. "No, not like that" does not.

    Then read the first minute of what comes back, because the quality of your correction decides whether you are standing here again in ten minutes. If two corrections in a row have not landed, stop correcting - the next two steps are for when the conversation itself has become the problem.

  4. Compact when the room is the problem, not the reasoning

    On agents that can report it - Claude Code, Codex and pi - the right-hand end of the bar carries a small gauge reading something like ctx 42k / 200k (21%): how full the agent's working memory is, re-read every few seconds. It runs green, turns amber the moment it reaches seventy percent, and red above ninety. An agent whose context is nearly full starts forgetting the beginning of its own task, and that looks exactly like an agent going wrong.

    Compact is the answer to that, and it is not a brake at all. It asks first, then summarizes the conversation so far and frees the room back up. The session keeps what it has learned and stays exactly where it is - nothing is sent to it afterwards, so it will sit there until you say something. It can take a minute or two. When the gauge is red but the work is going fine, this is the whole intervention: compact, then carry on.

  5. Clear context when the misunderstanding is load-bearing

    Sometimes the wrong turn is not a moment, it is a residue: the agent misread the task early and now everything it believes is built on that. Summarizing would just carry the misreading forward in fewer words. Clear context resets the conversation in place - the process keeps running, the same session on the same card, and what goes is the conversation you have had with it.

    It asks before it does it, and the question it asks is deliberately not the question Compact asks - one preserves the conversation and one destroys it, and two identical-sounding confirmations would teach one reflex for two opposite outcomes. Read which one you are looking at. Afterwards, write the task out again from scratch, as if to an agent that has not heard any of it - because it has not. It is still sitting in your repository, with whatever it reads for itself when it starts; what you took away is everything the two of you said.

  6. Read back to where it went off

    On a Claude Code session there is one more button. History opens the agent's own rewind picker inside the terminal, listing the earlier points in the conversation - but only on a session that has stopped. The button presses Esc twice, and Esc is also what Stop sends, so on an agent that is still working the first press ends the turn instead of opening anything. Stop it first, or wait until it is finished, then press History.

    Walk back through the list to find the exchange where things turned. That is worth doing even when you have already fixed the problem, because the turn is so often a vague instruction of yours rather than a bad decision of the agent's. You can restore to the point just before it and take the fork again with better words. Esc closes the picker.

Warning
Clear context cannot be undone, and the button sits inches from the ones you press without thinking. An afternoon of accumulated understanding goes with one click - that is why it asks first, and why Compact sits beside it as the version that keeps what the session has learned.
Note
The bar shows only the verbs DevThrottle has verified for this session's agent, so it is not the same row for every agent - pi has Stop but no Interrupt, and History belongs to Claude Code alone. An absent button means the keystroke has not been established for that tool, which is not the same as the tool being unable to do it; for pi's missing Interrupt it is stronger than that, because Ctrl+C there clears the editor and twice over quits, so a hard interrupt would be a kill. The full list, agent by agent, is on Starting and steering agents.
Tip
If you had queued instructions waiting, read them again before you send them. They were written for the path you just stopped, and one of them may now be an instruction to keep going down it - see Line up the next instruction.

When to take it over instead

The steps above assume the agent can still get there. Sometimes it cannot, and the skill worth having is noticing that early rather than after the fifth correction. The signals are consistent: you have corrected the same misunderstanding twice and it came back; the agent is confidently wrong about how your code works rather than about what you asked for; or the task turns out to need something only you know, and every prompt is you slowly typing out the answer anyway.

Taking over does not mean giving up on the session. It means one of three things, in rising order of cost. Click into the terminal and answer the agent directly, which is right when it is stopped on a menu or a yes-or-no question. Stop it and make the edit yourself, then tell it what you changed and let it carry on from there - agents deal with that far better than people expect. Or, when the whole approach was wrong, Clear context and start the task again with the better description you now have, which is the one thing this hour bought you.

Closing the session is the last resort, from the "..." menu on its card, and the part you actually care about is safe: your repository and working directory are untouched. Every change the agent already made to your code is still there, and closing undoes none of it. What ends is the agent's process and the card, along with the conversation in that terminal.

DevThrottle does tidy up after itself, though. Closing a session clears out files it keeps for that session in its own storage - among them the preamble file it writes for the agent, the small note the agent's own hook leaves saying where that session's conversation has moved to, and the session's terminal recording folder, which goes even if you never turned recording on. None of them is in your project, and this is not a complete list. The one worth acting on is the recording: if you want a session's recorded screens, copy them out before you close it.

If you think you may want the conversation back, look at New Session before you close rather than after: its Resume Session tab lists earlier sessions, and that is where picking one up again starts. Whether the session you are about to close will be waiting there is not something this page can promise you, so close it when you mean to stop.

None of this is tied to the desktop. The Cockpit's session view in a browser has the same five buttons, chosen by the same per-agent gating, and asks the same two questions before compacting or clearing - its clear wording names the command where the desktop does not. The one thing it does not carry is the context gauge: Working in a session. And if you would rather practise this as a drill against a session that has actually gone wrong, Steer an agent that is going wrong walks the same ground from the other end, including how to read the cards before you act.

Next

You can stop an agent, correct it, reset what it is holding, and tell when to take the keyboard yourself. The next step is the fastest way to make yourself understood in the first place - showing the agent a picture instead of describing one: Work with pictures.

The next step is being written - this page says what it will be.