Go from never having used a coding agent to working productively and safely with one. The learner should understand what an agent is and how it differs from a chat assistant. They should choose a tool, set up a protected first project, describe tasks the agent can do well, and follow and verify its work. They should recover from bad changes, manage context, and plan bigger changes. They should also use tests as the definition of done and run everyday workflows (bug fixes, features, writing tests, codebase exploration, scripts, small tools, refactors). Throughout, they should keep secrets and systems safe and keep their own understanding growing instead of outsourcing it.
Recognising when the agent goes in circles card 4 of 6

Stop, undo, reframe

builds on: Giving useful feedback on a wrong result, Interrupting and redirecting mid-task
In the date case, the agent spent four attempts swapping `%d/%m/%Y` and `%m/%d/%Y` back and forth. It never opened `data/orders.csv`. Every run printed the same `ValueError: unconverted data remains: 10:30`. That is flip-flopping with an unchanged error, so it is stuck. 1. **Stop** it. 2. **Undo** its edits so `src/dates.py` is back as it was. Use your tool's undo/rewind or a checkpoint (a saved copy of your files from before the task). Every patch rests on a wrong guess. 3. **Reframe**: give it the evidence it never looked at, and ask for a diagnosis before any edit.
Terms on this card
`%d/%m/%Y`
A date format pattern in Python: day/month/four-digit year. `%m/%d/%Y` puts the month first. The wrong pattern makes parsing fail.
ValueError
A Python error raised when a value has the right type but unusable content, such as text that doesn't match the expected date pattern.
unconverted data remains
Part of a Python date-parsing error. It means the text had extra characters, such as a time, after the part the pattern matched.
patch
A small change made to code to fix a problem. 'Patches over patches' means fixes stacked on earlier fixes without solving the cause.
flip-flopping
Switching between two approaches and back again (A, then B, then A) without either one working or any new information arriving.
Learn this step by step on Bytewise
Lesson goal: Spot the signs of a stuck agent: the same fix tried repeatedly, growing patches over patches, flipping between two approaches, or an apology without new evidence. Decide to stop, revert and reframe. · the whole lesson