Working With AI Coding Agents Effectively
AI coding tools no longer just suggest a line; they take a task, edit files, run commands, and report back. Learn how to delegate to a coding agent, review what it did, and stay in control without writing code yourself.
Two years ago an AI coding assistant finished the line you were typing. Today it takes a task, reads your project, edits several files, runs the tests, and comes back with a summary. That shift, from assistant to agent, changes what "using it effectively" means. You are no longer accepting or rejecting suggestions. You are delegating work and reviewing results, which is a skill most people already have from working with other humans, once they learn where the agent differs.
This module is for people who do not write code for a living and may not write code at all. You can still get real work out of a coding agent: scripts that clean up a spreadsheet, a small internal tool, an automation that moves data between two systems. The goal is to do that safely and to know when the agent has gone wrong.
What Changed: From Autocomplete to Agent
An assistant (the older kind) waits for you to type and proposes the next few lines. You are still the one writing the program; it is a fast typist with good recall.
An agent (Claude Code, Codex, Cursor's agent mode, and similar tools) works in a loop:
- It reads your request and looks around the project to gather context.
- It takes an action: edits a file, runs a command, searches the code.
- It checks the result (did the tests pass? did the command error?) and decides what to do next.
- It repeats until it believes the task is done, then reports back.
The important word is loop. The agent can take dozens of actions between your instruction and its report. That is what makes it powerful, and it is also why the habits from the assistant era (read every suggestion before accepting) do not transfer. You cannot read forty actions in real time. You review the outcome and the summary instead, the way you would review a colleague's work.
The Three Things That Make Delegation Work
A clear task with a definition of done. "Make the report script faster" is a wish. "The monthly report script takes 20 minutes; it should take under 2, and the output file must be byte-identical to the current one" is a task. The agent will do exactly as well as your specification lets it. Include what must not change.
Context the agent can find. Coding agents read a file at the root of your project, usually called CLAUDE.md or AGENTS.md, before they start. Put the things a new team member would need there: what the project is, how to run it, how to run the tests, and the rules ("never modify files in the data/raw folder"). You can write this file in plain English. It is the single highest-leverage thing a non-programmer can do to make an agent behave.
markdown# Project notes for the coding agent This project produces the weekly sales report. - Run it with: python report.py - Test it with: python -m pytest - Never edit anything under data/raw/. Those are source files. - The output goes to output/report.xlsx and its format must not change.
A way to verify. The agent will tell you it is done. Your job is to check, and the check should be something you can actually run: open the output file, run the script yourself, compare the numbers to last month's. If you cannot verify a task, do not delegate it to an agent unsupervised.
What Agents Do Well
- Well-specified changes to existing code. Rename this everywhere, add a column to this report, make this script also handle CSV files.
- Reading and explaining. "What does this script do and where does it get its data?" is an excellent first question in any project you inherit.
- Boilerplate and glue. Connecting to an API, parsing a file format, writing the repetitive part of a form.
- Tests and checks. Asking the agent to write a test that would catch a bug you found is a good habit: it makes the fix verifiable.
- Finding things. "Where is the tax rate set?" across a project you have never seen.
What Agents Do Poorly (and How It Shows)
They are confident when they are wrong. The summary will read the same whether the task succeeded or the agent fixed the wrong thing. Do not grade the summary; grade the result.
They over-reach. Asked to fix one function, an agent may "helpfully" refactor three files. Say what must not change, and check the list of files it touched (every tool shows this) before accepting.
They fake verification. An agent that cannot make a test pass will sometimes change the test. Watch for edits to test files you did not ask for.
They do not know your business. The agent will produce a plausible tax calculation, not the correct one for your jurisdiction. Anything where correctness depends on facts outside the code needs your review.
They get stuck in loops. If the agent has been running for a long time on a small task, it is probably retrying the same failing thing. Stop it, read what it tried, and give it the missing information.
The Review Habit
Treat the agent's report like a pull request from a new colleague who is fast, well-read, and occasionally overconfident. A five-minute review routine:
- Read the summary for claims, then check one. If it says "all tests pass", run the tests. If it says "the output is unchanged", diff the output.
- Look at the list of changed files. Anything outside what you expected gets a question.
- Run the thing. Not the tests, the actual script or tool, on real input.
- Ask it to explain one decision. "Why did you change the date format?" A good answer is a reason. A bad answer is a restatement.
If any step fails, do not patch it yourself. Tell the agent what you found and let it fix it. That keeps you in the reviewer's seat, where a non-programmer is most effective.
Staying in Control: Permissions
Every serious coding agent has a permission setting for what it may do without asking: read files only, edit files, run commands, access the network. For your own work, start restrictive. Let it read and propose; approve edits and commands one at a time until you trust it on that project. Loosen permissions per project, not globally.
The rule that matters most: an agent should never be able to do something irreversible (delete files, send an email, push to a shared repository, spend money) without you approving that specific action. If a tool does not let you set that boundary, use a different tool.
Using Coding Agents Without Writing Code
You can get a surprising amount done with the loop "describe, delegate, verify, correct" and no programming:
- Ask the agent to build a small script, then ask it to explain how to run it and what each input means.
- Ask it to add a check that fails loudly if the input file looks wrong, so that you find out before the report goes out.
- Ask it to write a
READMEin plain English for the next person. - When something breaks, paste the error message and ask what it means and what the options are before asking for a fix.
The skill you are building is not coding. It is specifying, reviewing, and setting boundaries, which is the same skill you will need to work with any AI agent, coding or otherwise.
Common Mistakes
- Delegating something you cannot verify. If you cannot check the result, you are not delegating, you are hoping.
- Approving from the summary. The summary is the agent's opinion of its work.
- Global permissions. "Allow everything" saves ten seconds and costs you the one time it deletes the wrong folder.
- No context file. Every session starts cold. Ten minutes on a
CLAUDE.mdsaves that ten minutes every time. - Fixing it yourself. The moment you edit the code, you have lost the ability to say "I did not write this, I reviewed it," and you have taken on a maintenance burden you did not want.
Where to Go Next
- ai-for-research-writing-analysis: the same delegate-and-verify habit applied to documents and analysis
- evaluating-ai-tool-output: a general framework for judging AI output you did not produce
- ai-agents-what-they-are-and-how-they-go-wrong: what agents are in general, and why what they are allowed to do matters more than how smart they are
What to Practice Next
Pick one repetitive task from your own work that involves a file (a spreadsheet you reformat monthly, a report you assemble by hand). Write a one-paragraph task description with a definition of done, create a CLAUDE.md with the rules, and delegate it to a coding agent with read-only permissions first. Review using the four-step routine, then loosen permissions only as far as that task needs. Document what it got right, what you had to correct, and what you would specify differently next time.
Module 8 of 25 · Curious to AI-Fluent
Stay in the loop
Get new ML/AI lessons in your inbox.
No account needed. We will send curriculum updates, launch notes, and practical learning resources.
Related Posts
More postsAI Agents: What They Are, What They Can Do, and How They Go Wrong
An agent is an AI that takes actions, not just answers questions. That changes what safe use looks like. Learn in plain English what agents are, how they connect to your tools, why they can be tricked by what they read, and the one question to ask before letting one act for you.
Capstone: Build, Document, and Present an AI-Powered Project
The capstone brings everything together. You will build a real AI-powered project, evaluate it systematically, document it clearly, and present it to a non-technical audience.
Career Paths Into AI (Technical and Non-Technical)
Map the AI-related roles, what each one expects, and which next step fits your current background.