Work effectively with AI coding agents. Understand them as language models running in a tool loop with limited context, which is why they guess, game the visible signal and report confidently. Recognise the shortcut and correctness tells in their code across Python, TypeScript/JavaScript, Rust, Java and Go, and know the damage each one does later. Verify changes instead of trusting them, review diffs fast for quality and security, judge when work is truly finished, and choose, design and steer tasks so agents can finish them well.
Limiting what the agent can break
card 1 of 6
What could it actually do right now?
builds on: A coding agent is a model in a loop, Untrusted text can steer the agent
You start a terminal agent in your main checkout. Edits and commands are auto-approved. You ask it to fix a failing migration test. Your shell exports `AWS_PROFILE=prod-admin` and a `DATABASE_URL` that points at production, and you have two hours of uncommitted work. Halfway through, the agent decides the database looks "out of sync" and wants to reset things. What is it able to do?
Terms on this card
- main
- The repository's primary branch, which everyone builds on.
- auto-approved
- Agent actions that run without asking you first.
- migration
- A script that changes a database's schema or data, such as adding or dropping columns. It is often irreversible for data.
- AWS_PROFILE
- Environment variable telling AWS tools which named credential profile to use from the AWS config files.
- uncommitted work
- Changes in your working directory that git has not recorded in any commit, so git cannot restore them.
Lesson goal: Set up safeguards that bound the damage an agent can do: sandboxes or containers, no production credentials, separate branches or worktrees, and approval gates for destructive commands such as `rm -rf`, `git push --force`, `git reset --hard` and database migrations. Match the agent's permissions to how much you trust the task. ·
the whole lesson