All courses

Following the agent while it works

Read the stream of tool calls as it happens: which files it opens, what it searches for, what it runs. Spot early signs it has misunderstood, such as wrong files, unrelated edits or repeated failures.

Builds on: Approvals and permission modes, How a code project is laid out

Read it card by card Start the whole course

Lines are scrolling past: now what?

You type ▸ You: The cart total ignores the discount code. Fix it. The agent starts working and lines appear fast: `⚙ Search: ...`, `⚙ Read: ...`, `⚙ Run: ...`, then an approval prompt. You could look away and wait for its final message. But what are these lines telling you, and what should you watch for while they scroll?

Each tool call shows its current guess

Each tool call is the agent acting on what it *currently thinks* you meant. Its search terms show which words or ideas from your request it latched onto. The files it opens show where it believes the problem lives. The commands it runs show how it means to check its work. A misunderstanding usually shows up here, several calls before any edit. That is the cheapest moment to catch it. The final message only tells you what it *says* it did.

What to watch, call by call

- **Search / Read**: do the files belong to the part of the project your task is about? Use what you know about the project layout. - **Edit**: does the task need every file it edits? Edits to config files or to unrelated features are a warning. - **Run**: is the command related to the task, and one you expected? - **Repeats**: if the same command fails again and again after small tweaks, the agent is stuck, not making progress. Each approval prompt is a natural pause for this check. In auto-approve mode there is no pause, so glance at the stream while it runs.

A session heading the wrong way

You asked about the invoice page, whose code lives in `src/invoices/`. Before you answer the approval prompt, read what the agent opened.
▸ You: On the invoice page, show dates
  as DD/MM/YYYY instead of MM/DD/YYYY
⚙ Search: "date" in src/
⚙ Read: src/reports/export_csv.py
⚙ Read: src/reports/monthly.py
⚙ Edit: src/reports/export_csv.py
[Approve? yes / no / always]

Reading that session

Searching for `"date"` is broad, so it probably matched code in many places. Both files it read are in `src/reports/`, which handles reports and exports, not the invoice page. It opened nothing under `src/invoices/`. So this edit would most likely change the format in downloaded CSV files, and the page would look the same. Answer `no`. A healthy session would open the invoice page's code in `src/invoices/`, find where it formats the date, and edit only that.

Watch the actions, not just the ending

The tool calls show what the agent actually understood. As they appear, check which files it opens, what it edits and whether the same failure keeps repeating. A wrong file or an unrelated edit is your cue to say `no` before it builds on the mistake. Soon you'll learn how to stop it and point it to the right place.

On Bytewise this lesson comes in small steps with a check at the end, and the app brings it back right before you would forget it.