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.
Reading an error message and stack trace
card 5 of 6
What you paste to the agent
builds on: Command output and exit codes
The command, what you expected, and the trace exactly as printed. Exact file names and line numbers let the agent open the right spot. A loose summary makes it guess.
▸ You: `python report.py` crashes. I
expected it to print the total price.
Full output:
Traceback (most recent call last):
File "report.py", line 8, in <module>
total = add_prices(rows)
File "src/prices.py", line 5, in add_prices
total += r["price"]
KeyError: 'price'
Find the cause before changing code.
Terms on this card
- command
- A line of text that tells the computer to run a program, typed in a terminal, for example `python src/cart.py`.
- summary
- The message the agent writes at the end saying what it did. It is the agent's own claim, not a check.
- 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.
Lesson goal: Find the error type, the message, and the file and line where a failure happened in a stack trace. Identify which part to paste to an agent as evidence. ·
the whole lesson