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.
Recovering from a bad change card 5 of 6

Restart with what you learned

builds on: Commit before every task: checkpoints, Undoing with git: discard, reset, revert, Recognising when the agent goes in circles
Say the stack trace showed that the agent's change to `load_rows()` broke startup. Typing "still broken, try again" just repeats the request that failed. Do this instead: ▸ You: I reset all files to commit `e51f0c2`, so your export edits are gone. Add CSV export in `src/report.py` only. Last time, changing `load_rows()` broke startup, so leave it as is. Afterwards run `pytest` and `python app.py`. Mention the reset, because the agent's conversation still describes edits that no longer exist. A fresh session also clears the bad idea. There, skip the reset line but keep the lesson.
Terms on this card
commit
A saved snapshot of all your project's files in git, with a short message and an ID (hash) you can return to.
CSV
Comma-separated values: a plain-text table format that spreadsheets can open.
pytest
A common tool that runs a Python project's automated tests and reports which pass or fail.
session
One working conversation with the agent, from the task you type until you accept or redirect the result.
agent
An AI tool that doesn't just chat. It reads your project's files, edits them and runs commands to carry out a task you give it.
Learn this step by step on Bytewise
Lesson goal: Given a broken state, choose the right recovery: discard uncommitted edits, return to the last checkpoint, or revert a specific commit. Then restart with a better prompt instead of piling fixes onto a bad attempt. · the whole lesson