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 5 of 6

Match permissions to trust

builds on: A coding agent is a model in a loop, Untrusted text can steer the agent
**Exploring an unfamiliar repo or an outsider's issue**: untrusted text may steer the agent. Use read-only access in a container, no credentials, and auto-run nothing. **A routine fix in your own repo**: auto-approve edits and tests inside its worktree, and ask for everything else. **Migrations, force pushes, deploys**: the agent drafts them. You read them and run them yourself, against a target you chose.
Terms on this card
container
An isolated process environment (e.g. Docker) that sees only the files, network and variables you explicitly give it.
worktree
A second working directory for the same git repository, checked out on its own branch. Changes there don't touch your main checkout's files.
the agent
The AI coding system doing the work: a chat assistant, IDE agent or terminal agent.
Learn this step by step on Bytewise
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