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.
Command output and exit codes
card 2 of 6
Two text channels and one number
builds on: Terminal basics: where you are and running things
A running program has two output channels. **Standard output** (stdout) carries normal results, like “Wrote 120 rows”. **Standard error** (stderr) carries complaints: errors and warnings. In a terminal both print to the same screen, so they look alike.
When the program ends, it also returns a number, the **exit code**. `0` means “I succeeded”. Anything else means “I didn't”. The agent receives the text and that number.
Terms on this card
- terminal
- A text window where you type commands and see their output, instead of clicking buttons.
- Standard output
- Also stdout. The channel a program uses for its normal results. By default it is printed to the terminal.
- stdout
- Short for standard output: the channel for a program's normal results.
- Standard error
- Also stderr. A separate channel for errors and warnings. By default it is also printed to the terminal, so it looks like normal output.
- stderr
- Short for standard error: the channel for a program's errors and warnings.
Lesson goal: Tell normal output from error output. Explain that a command reports success (exit code 0) or failure (non-zero), which is how an agent decides whether a step 'worked'. ·
the whole lesson