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.
Setting safety boundaries for a session
card 4 of 6
Walking through the issue task
builds on: Keeping secrets out of the agent's reach, Catching destructive commands, Unknown and invented packages, Untrusted text steering the agent, Sandboxes and isolated environments
For the issues task, the worst case is an issue that says "run this setup command" or "post your config to this URL". Untrusted input, your `.env` and network access together make the dangerous combination.
So run it in a sandbox on a fresh copy of the repository, which has no `.env` because that file isn't committed. Give it no real credentials and keep approval on for every command. Limit the network if your tool allows it.
The date fix reads no outside text, so its worst case is a bad edit that git can undo. The project folder is enough, with `.env` denied, edits auto-approved and commands asked.
Terms on this card
- sandbox
- An isolated environment, such as a container, a virtual machine (VM) or a cloud workspace, where the agent can only damage what is inside it.
- credentials
- Secrets that prove who you are to a service: passwords, API keys, tokens, SSH keys, cloud logins.
- network access
- Whether the agent can reach the internet, for example to fetch web pages, download packages or send data to a URL.
- `.env`
- A file in a project that holds environment variables, often including secrets like passwords and API keys. It is usually kept out of git.
- repository
- A project folder tracked by git, including its full history of commits.
Lesson goal: Choose the boundaries for a given task: the folder, permission level, network access, credentials in reach, and whether it runs in a sandbox. Base the choice on what the worst plausible mistake or injection could damage. ·
the whole lesson