◆ AI All-in-One

Level 2 Agentic Coding · Agentic Coding

What Is Agentic Coding?

Agentic coding means building software by giving tasks to an AI agent that reads your code, runs commands and edits many files on its own, while you direct, review and verify. This chapter explains how it differs from autocomplete and chat, what agents do well and badly, and which tools exist.

Level
●●●●● Beginner
Reading
14 min
To learn it well
30 minutes to read
↗ Plan a path here

Read first

Asking Well: Everyday Prompting

This leads to

Setting Up a Coding AgentPlanning and Specs: Telling an Agent What to Build
The full path from zero — 5 concepts before this one
  1. What Is AI?
  2. How Machines Learn
  3. Large Language Models, Explained Simply
  4. AI Fluency: Working Well with AI
  5. Asking Well: Everyday Prompting
  6. What Is Agentic Coding?

Read them roughly in this order. See it on the concept map →

Why it matters

For most of computing history, building software meant typing every line yourself. Since about 2025 there has been a second way. You describe a change in plain language to a coding agent, a program built around a large language model that can open the files in your project, search through them, run commands such as tests, and edit as many files as the change needs. It works in a loop until it believes the job is done, then hands the result back to you.

Working this way is called agentic coding. It is now an everyday practice for many professional developers, and it has opened programming to people who could never have built a working app before. It is also easy to do badly. An agent can produce a thousand lines that look finished and are quietly wrong, delete the test that would have caught the mistake, and describe the result as a success.

This part of the guide teaches the practical craft: how to set up an agent, how to use git as a safety net, how to plan and specify work, how to give an agent lasting context, how to use tests as guardrails, how to review what it writes, how to extend it, run several at once and ship the result. This first chapter sets out the idea and the vocabulary. If you want to know what happens inside an agent (its tools, its edit format, how it is benchmarked), read AI Coding Assistants and Agents alongside this part.

The idea

Three generations of help

AI help with code arrived in three waves, and each wave moved a different part of the work from you to the machine.

  1. Autocomplete (GitHub Copilot's preview, June 2021). As you type, the AI predicts the next few lines. You still decide what to build, find the right place, run the program and check it.
  2. Chat (ChatGPT, late 2022). You paste code and a question into a chat window and get back an explanation or a snippet. You still copy it into your files, run it and report the errors back.
  3. Agents (mainstream from 2025). You give a task. The agent finds the relevant files itself, edits them, runs the tests, reads the errors and tries again, without you copying anything anywhere.
Autocomplete from 2021 Chat assistant from 2022 Coding agent from 2024–25 you you: paste it in AI: search, read AI: next lines AI: a snippet AI: many files you you AI: tests, builds you you AI first, then you accept or reject each suggestion ask, copy, paste, run and fix direct, review, verify Find the relevant code Write the change Run it Check it works Your job you do it the AI does it AI, then you confirm
Fig. 1 What moved from you to the AI in each generation of coding help. With an agent, finding, writing and running are all delegated. Checking is shared: the agent checks first, and you confirm.

The jump from chat to agent is bigger than it looks. In chat, you are the loop: every run, every error message and every retry passes through your hands, so you see everything. With an agent, the loop runs without you. It might take forty steps in five minutes. That is where the speed comes from, and also where the risk comes from: you only see the end result unless you look.

The human's new job

If the agent writes and runs the code, what is left for you? Three things, and they matter more than before:

  • Direct. Decide what to build, break it into tasks of the right size, and say clearly what "done" means. A vague task gets a confident guess. A precise one, with a way to check it, gets a working change. (Planning and Specs: Telling an Agent What to Build is about this.)
  • Review. Read what the agent changed, the diff, before accepting it. The question is not only "does it work?" but "is this what I asked for, and nothing else?" (Reviewing and Debugging AI-Written Code.)
  • Verify. Run it yourself. Try the awkward inputs. Make sure the tests test something real. (Tests as Guardrails.)
1. Direct the task, the context, what "done" means 2. The agent works on its own gather context edit files run tests read the output repeat until checks pass seconds to many minutes, dozens of steps 3. Review read the diff: what changed, and why? 4. Verify run it yourself, try the edge cases Commit not right? redirect, or undo and start again
Fig. 2 The agentic coding loop. You direct; the agent runs its own inner loop of gathering context, editing and running checks; then you review the diff and verify the behaviour before committing. If it is wrong, you redirect or undo.

A useful picture is a capable new colleague on their first week. They are fast, they have read a huge amount, they never get tired, and they will cheerfully attempt anything. They don't know your project's history or conventions unless someone writes them down. They sometimes misunderstand the goal and solve a different problem very well. You would not merge their first pull request without reading it, and the same goes for an agent.

Key idea In agentic coding the agent does the typing, searching and running. You own the outcome: you decide what to build, you read every change, and you check that it really works. An agent makes a careful developer much faster and a careless one much more dangerous.

Agentic coding, vibe coding and vibe engineering

You will meet two neighbouring terms. Vibe coding, named by Andrej Karpathy in February 2025, means accepting whatever the AI produces without reading the code, judging only by whether the app seems to work. It is fine for a throwaway prototype or a personal tool, and Building Apps Without Coding shows how to do it well. It is not fine for anything that stores other people's data, handles money or has to keep working next year.

At the other end, Simon Willison proposed vibe engineering (October 2025) for the opposite style: experienced developers using agents while staying fully accountable for the code, with tests, planning, documentation and review. This part of the guide teaches that style, starting from zero. You don't need to be an experienced programmer to begin, but you do need to adopt the habits of one: version control, tests, small steps and reading diffs. The agent can teach you much of the rest as you go.

What agents are good at, and what they are bad at

As of late 2026, agents are reliably good at:

  • Well-specified changes in familiar territory: add a command-line flag, write a form, add an API endpoint that mirrors an existing one, convert a script to use a library.
  • Reading code: explaining an unfamiliar project, finding where something happens, tracing a bug through several files.
  • Boilerplate and glue: configuration files, test scaffolding, data conversions, small scripts.
  • Mechanical changes across many files: renaming, updating a library call everywhere, adding type hints.
  • Fixing things that have a clear error message, because the error is precise feedback.

They are unreliable at:

  • Deciding what to build. They will build the wrong thing beautifully if the request is ambiguous.
  • Judging their own work without an outside check. "It looks right" is not evidence. Tests, type checkers and actually running the program are.
  • Long tasks without checkpoints. Small errors compound over many steps (the compounding error problem).
  • Knowing what they don't know. They may call a library function that doesn't exist, or use an old version's API, with full confidence.
  • Security and edge cases, unless you ask for them explicitly and check them.
  • Restraint. Asked to fix one thing, they often "improve" five others.

The evidence on speed is mixed, and worth knowing. In a 2025 randomised trial by METR, experienced open-source developers working in large projects they knew well were 19% slower when allowed to use AI tools (mostly Cursor, as of early 2025), though they believed they had been faster. The tools have improved a lot since, and the trial studied a demanding setting. The lasting lesson is that feeling productive and being productive differ. Judge by finished, working, reviewed changes, not by lines produced.

The tools, as of late 2026

Coding agents come in three shapes. The skills in this part transfer between all of them.

  • Terminal agents run in a command-line window, inside your project folder. A terminal agent reads and edits your files and runs commands in the same shell you use. Examples: Claude Code (Anthropic, first released in February 2025), Codex CLI (OpenAI, open source, 2025), Gemini CLI (Google, open source, 2025; since June 2026 Google points free users to its successor, Antigravity CLI) and Aider (open source, since 2023, notable for committing every change to git automatically).
  • IDE agents live inside a code editor. An IDE agent shows its edits in the editor as it works, so you can watch and accept or reject them. Examples: Cursor, whose agent is its default mode, GitHub Copilot's agents in the VS Code chat view, and editor extensions for Claude Code and Codex.
  • Cloud agents run on someone else's computer. You give a cloud agent a task from a web page, a chat app or a GitHub issue. It works in a fresh sandboxed copy of your repository and comes back with a pull request. Examples: the Copilot cloud agent (assign it a GitHub issue and it opens a pull request), Claude Code on the web, Codex cloud, Cursor's cloud agents and Google's Jules.

Names, prices and features change every few months (as of late 2026, Copilot's "coding agent" has been renamed "cloud agent", Cursor's "background agents" became "cloud agents", and Windsurf is now Devin Desktop), so check each tool's current documentation. Most need a paid plan or an API key. This part uses Claude Code as its main example because its documentation is thorough. Where other tools do the same thing differently, the chapters say so.

Most agents also read a plain Markdown instructions file in your project: CLAUDE.md for Claude Code, and AGENTS.md, an open format now stewarded by the Linux Foundation's Agentic AI Foundation, which Codex, Cursor, Copilot, Aider, Jules and many others read (Claude Code reads it when a project has no CLAUDE.md, and Gemini CLI can be set up to use it). Project Context and Memory Files covers what to put in it.

In practice

What does a session actually look like? Here is the shape of almost every agentic coding task, whatever the tool:

  1. Start from a clean, saved state. Commit your work in git first, so any change the agent makes can be seen as a diff and undone in one command.
  2. Open the agent in your project folder. In a terminal that is cd my-project and then the agent's command (claude, codex, gemini). In an editor, open the agent panel.
  3. Ask it to look before it leaps. For anything bigger than a one-line fix: "Read the code involved and tell me your plan. Don't change anything yet."
  4. Correct the plan, then let it implement.
  5. Approve or deny its actions. By default most agents ask before editing files or running commands. You can loosen this as you gain trust (Setting Up a Coding Agent explains the modes).
  6. Make it check its own work: run the tests, run the program, look at the output.
  7. Review the diff yourself, run the program yourself, then commit.

A first agent session

Here is a lightly abridged real-shaped session in Claude Code. The project is tally, a tiny expense tracker written in Python that this part of the guide grows chapter by chapter. It has two files: tally.py, which can already record expenses with python tally.py add 12.50 lunch, and test_tally.py, its tests. Lines starting with > are what you type. Lines starting with ● are the agent's actions, and ⎿ shows their results.

> tally can record expenses but has no way to see them. Add a `report`
  command that prints the total per category, sorted by category name,
  with amounts right-aligned. Add a test. Read the code first and tell
  me your plan before editing.

● Read(tally.py)
● Read(test_tally.py)

  Plan:
  1. Add totals_by_category(rows) to tally.py: sums Decimal amounts per
     category, returns a dict sorted by name.
  2. Add a `report` subcommand in main() that loads expenses.csv and
     prints one line per category.
  3. Add test_totals_by_category in test_tally.py using pytest's
     tmp_path so it never touches your real expenses.csv.
  4. Run pytest.
  Shall I go ahead?

> Yes.

● Update(tally.py)          +26 -6
● Update(test_tally.py)     +13 -1
● Bash(python -m pytest -q)
  ⎿ ......                                   [100%]
    6 passed in 0.01s

  Done. `python tally.py report` now prints totals per category.
  All 6 tests pass.

Notice what happened. The agent read before writing, proposed a plan you could correct, used the project's existing style (Decimal for money, not floating-point numbers that would round 0.1 + 0.2 to 0.30000000000000004), wrote a test that uses a temporary folder, and ran the tests. You still have two jobs left: read the diff (git diff) and run python tally.py report yourself on real data.

Worked example: one task, three ways

Take that same task, "add a report command", and imagine doing it with each generation of tool.

With autocomplete, you open tally.py, scroll to main(), and start typing sub.add_parser("report". The AI completes the line, then suggests a loop that prints totals. It guesses well because the file is open. You still had to know where the change goes, write the test yourself, and run everything. Time: perhaps fifteen minutes for someone who knows Python. It is impossible for someone who doesn't.

With chat, you paste tally.py into a chat window and ask for a report command. You get back a full new version of the file. You copy it over your old one, and it works, but the chat model renamed a function your tests import, so the tests now fail. You paste the error back, get a fix and paste again. Three round trips. You did all the running and checking, which is tedious but means you saw every step.

With an agent, you get the session above. One instruction, one plan to approve, a finished change with a passing test, in under a minute. But you saw only the summary. Did it touch anything else? Is the test meaningful, or does it test nothing? The answers are in the diff, and reading it takes two minutes:

git diff --stat
#  tally.py      | 32 ++++++++++++++++++++++++++------
#  test_tally.py | 14 +++++++++++++-
#  2 files changed, 39 insertions(+), 7 deletions(-)

Two files, roughly the expected size. That is a good sign. A diff that touched seven files for this task would be a reason to look harder. The habit to build from day one: the agent's summary is a claim; the diff and the test run are the evidence.

Common mistakes

  • Starting without git. If the agent's change is bad and you have no saved version, undoing it is painful. Commit before every task. (Git for Agent Work.)
  • Giving one giant task. "Build me a budgeting app with logins and charts" produces a large, unreviewable pile of code. Give one small, checkable task at a time.
  • Trusting the summary. Agents report success readily, including when tests were skipped or a requirement was quietly dropped. Read the diff.
  • No way to check. Without tests or a clear manual check, neither you nor the agent can tell if it worked. Ask for a test with every change.
  • Letting the session run forever. Long conversations fill the model's context window with old, irrelevant detail, and quality drops. Start a fresh session for each new task.
  • Switching off all the approvals on day one. Approval prompts are tedious, but they are how you learn what the agent does. Loosen them gradually, and only inside a project that is safely in git.

Watch out A coding agent can run any command you could run, with your files, passwords and network access. Text it reads (a README, a web page, a GitHub issue) can contain instructions written by someone else: this is Prompt Injection and LLM Security. Keep approvals on for anything that leaves your machine, never paste secrets into the chat, and don't run an agent with no approvals outside a sandbox.

Where it leads

Try it

  1. Write down three small software tasks from your own life or work (a script, a spreadsheet helper, a web page). For each, write one sentence saying how you would check it worked. If you can't write that sentence, the task isn't ready for an agent.
  2. For one of them, sort the work into "direct", "review" and "verify". Which of the three do you feel least able to do? That is the chapter of this part to read most carefully.
  3. Look up the current documentation of one terminal agent, one IDE agent and one cloud agent. Note what each needs (account, subscription, API key) and whether it asks before running commands by default.

Hint for 1: good checks are concrete: "running python tally.py report after adding 12.50 lunch and 3.20 lunch prints lunch 15.70".

Check your understanding

5 quick questions. Pick an answer to see whether you were right and why. Your best score is saved on this device.

  1. Your manager asks you to use a coding agent to add a small feature. The agent finishes and reports "Done, all tests pass." What should you treat as the evidence that it worked?

  2. What is the biggest practical difference between chatting with an AI about code and using a coding agent?

  3. A colleague builds a personal one-off tool by accepting whatever the AI writes without reading the code. Later they want to use the same approach for an app that stores customers' payment data. What should you tell them?

  4. Which of these tasks is a coding agent most likely to do reliably?

  5. In the 2025 METR trial, experienced developers using AI tools on projects they knew well were 19% slower but believed they were faster. What is the lasting lesson?

Finished this chapter?

Learn more

Hand-picked courses, books, videos and tutorials for going deeper. See all resources →

Article

Claude Code: Best practices for agentic coding

Anthropic · 2025 · Beginner · Free

Concrete workflows for coding agents: CLAUDE.md files, explore-plan-code-commit, test-driven loops, course-correcting early, and running agents safely.

Article

Vibe engineering

Simon Willison · 2025 · Beginner · Free

Why using coding agents well is hard, skilled work: the habits (tests, planning, documentation, version control, review) that let experienced developers stay accountable for agent-written code.

Course

Claude Code: A Highly Agentic Coding Assistant

Elie Schoppik (DeepLearning.AI with Anthropic) · 2025 · Beginner · Free

A short video course that builds and refactors real projects with Claude Code: exploring a codebase, CLAUDE.md, planning, parallel sessions with worktrees, MCP and GitHub integration.

Article

The 70% problem: Hard truths about AI-assisted coding

Addy Osmani · 2024 · Beginner · Free

Why AI gets non-experts most of the way to a working app quickly and then stalls, and what the remaining 30% (edge cases, security, maintainability) demands of you.

Docs

AGENTS.md

Agentic AI Foundation (Linux Foundation) · Beginner · Free

The open format for a README written for coding agents: what to put in it, how nested files work in monorepos, and the long list of agents that read it.

Facts checked as of 30 November 2026. Fast-moving details (products, prices, laws) change often. · Source: content/entries/agentic/agentic-coding.md