From Autocomplete to Agent
In 2021 a coding assistant suggested the next few lines as you typed. By 2025 an agent could take a task, open the files it needed, edit them, run the tests and come back with a finished change. The models improved along the way, but the change that matters for your working day is a different one: who decides the next step.
On your first day at Cragmoor, the climbing-gym company whose booking service you have just joined, all three generations are on offer, often inside the same editor. They look alike, and they are not. Each one puts your attention in a different place: on the line at your cursor, on the snippet you pasted, or on a diff that arrives after the work is already done. Knowing which one you are using tells you where that attention has to go.
Completion in the Editor
The first generation lives at your cursor. It sees the file you are in, and as of 2026 often a few neighbouring files as well, and proposes the next line or the next block as grey text ahead of what you have typed. You press a key to accept it or keep typing to ignore it. The first widely used assistant of this kind went into technical preview at the end of June 2021, and the shape has not changed since: one suggestion at a time, at the exact point where you are already looking.
The unit of output is a few lines, and review is built in. You cannot accept a suggestion without seeing it, because it appears in the middle of the line you are reading anyway. That is why its typical failure is local and visible. At Cragmoor it looks like a call to the refund function with the class start and the cancellation time swapped: the line reads naturally, it type-checks, and it returns zero for every refund. You catch it because you were looking straight at it, or the first test you run catches it.
Chat Beside the Editor
The second generation, in common use beside the editor by 2023, is a conversation. You paste code and a question into a panel or a browser tab, it answers with code, and you copy the answer back. The model sees only what you pasted. You carry the context in both directions: in, by choosing what to paste, and out, by deciding where the answer goes and adapting it to the code around it.
The unit of output is a function or a snippet, and the typical failure is a mismatch between what you pasted and what the code actually is. Paste the refund function and ask for a 12-hour window, and you get back a correct function for the code you showed it. It never saw the second copy of the 24-hour rule that the cancellation screen in booking keeps for itself, because you did not paste that file. A copy taken before your last edit fails the same way: the answer is right about code that no longer exists.
The Agent
The third generation takes a task instead of a question. You describe what you want; the agent decides which files to read, edits several of them, runs commands such as the test runner, the type checker and git, reads what those commands print and goes round again until it judges the task done. The next page shows that loop. What matters here is that each of those decisions is the agent's, made between your messages.
Ask an agent to cut Cragmoor's refund window from 24 hours to 12 and within a couple of minutes it has searched the code for the rule, opened refunds, changed it, updated the tests that asserted the old value, run them and written you a summary. The unit of output is a change across files, and it arrives after the work rather than during it. You were not looking at any of those lines when they were written.
| What it sees | What it does | Unit of output | Who picks the next step | |
|---|---|---|---|---|
| Completion | The open file, often a few neighbours | Proposes the next line at the cursor | A few lines | You, keystroke by keystroke |
| Chat | Only what you paste | Answers in text and code | A function or snippet | You, by what you paste and copy back |
| Agent | What it chooses to read in the repository | Reads, edits, runs commands, repeats | A change across files | The agent, until it decides it is done |
What Changed Is Who Drives
With completion you take every step and the tool suggests. With chat you take every step and the tool advises. With an agent, the tool takes the steps between your messages: twenty or forty tool calls for one ordinary task is a normal run, and what you see at the end is the result. The model inside may be the same in all three cases. The program around it decides how much it is allowed to do before you look.
The cost of that shift is that review moves. With completion, review happened before acceptance and cost nothing extra, because you were reading the line anyway. With an agent, review is a separate act you have to choose to do, on a diff of perhaps 300 lines, after the agent has already told you it is finished. A 300-line change takes minutes to generate and still takes a careful reader the better part of an hour. Reading the diff you did not write is the subject of Chapter 6, and it exists because of this move.
Pair programming is the closest human comparison. A navigator beside a driver sees every line typed and steers as it happens. Working with an agent, you are a navigator who sees only the result unless you choose to watch, and watching is optional. Reading what came out is not.
All Three, Still
The generations did not replace one another. As of 2026 a working engineer uses completion for the line being written, chat for a question, and an agent for a change that spans files. Take three tasks from your first week at Cragmoor. Renaming a variable inside one function is a job for your own hands and the editor's rename command, which is mechanical and safe by construction. Asking why a test in schedule fails is a question, so chat answers it, or an agent allowed only to read. Changing the refund window across modules is a multi-file change that tests can check, which is the agent's job, followed by your review of everything it touched.
Choosing between them is choosing how much of the next half hour you want to steer yourself. There is also code you should keep typing even when an agent could write it: code you need to understand deeply, and code you are writing in order to learn. The page on when to write it yourself, in Chapter 5, gives the test.
A chat assistant sees only what you paste and answers in text; you decide where the code goes and apply it yourself. Choose it for a question, an explanation, or a single function you will place by hand.
An agent reads and acts in the repository itself, across files, running commands; you review what it did afterwards. Choose it for a change that spans files and that tests can check.
- "An agent is a smarter model than the chat assistant." Often it is the same model. The difference is the program around it, which lets it read files, run commands and loop. The same model in a chat window cannot see your repository at all.
- "Agents made completion obsolete." They solve different problems. Completion keeps you in control of every keystroke at the price of a few lines at a time, and for code you are thinking through line by line it is still the right tool.
- "More autonomy means less work for me." The typing moves to the agent. The work moves to specifying the task and reading the result, and for a change of a few hundred lines the reading alone is most of an hour.
- "If it ran the tests itself, the change is checked." It ran the tests it chose, when it chose, and decided for itself what counted as done. A passing run proves only what those tests assert, and an agent can edit the tests too.
- "The agent knows my codebase." It knows what it has read in this session and nothing else about your project. On a codebase of 60,000 lines, that is a small and accidental fraction.
- Pick the generation by how much of the next step you want to decide: completion for code you are composing, chat for a question, an agent for a multi-file change you will review as a diff.
- Plan to review after the fact whenever an agent drives. The line-by-line acceptance that completion gave you for free is gone, and the habits of Chapter 6 replace it.
- Judge an assistant by what it can see and do, not by how fluent it sounds. Its reach decides both how useful it is and how much damage one wrong step can do.
- Keep typing the code you need to understand. Delegating it saves minutes today and costs you the knowledge you will need when it breaks.
Knowledge Check
You move from editor completion to an agent for most of your changes. What happens to code review?
- It becomes unnecessary for changes the agent has tested itself
- It moves from each accepted line to a separate read of the diff
- It stays line by line, because the agent shows each line for approval
- It shifts entirely to the teammate who approves the pull request
A chat assistant rewrites the refund function you pasted so the window is 12 hours. The members' cancellation screen still says 24. What went wrong?
- The model miscalculated the new window inside the function
- The pasted function was an older copy than the one in the file
- A second copy of the rule lived in a file that was never pasted
- The chat window cached an old version of the cancellation screen
Which pairing of task and assistant generation fits best?
- Rename a local variable in one function: send the task to an agent
- Change the refund window across modules: paste them into a chat
- Ask why one test in schedule fails: put the question to a chat
- Update a rule used in five files: accept completions file by file
An agent finishes a task and reports that all tests pass. Why is that weaker evidence than it sounds?
- Agents cannot run real commands, so the report is always invented
- Passing tests are never meaningful evidence that a change is correct
- It chose which tests to run, may have edited them, and judged done
- Tests run by an agent use a different runtime from the team's runs
What is the typical failure of editor completion, and why is it usually caught?
- A plausible line with swapped arguments, seen as you accept it
- A wrong change spread over modules, caught later in code review
- A false claim that tests passed, caught by rerunning the suite
- A stale copy of the pasted code, caught when the answer fails
You got correct