How does a coding agent's scope differ from inline code completion?
Describe what a coding agent does that a code-completion model (e.g. GitHub Copilot's inline suggestion) cannot. Which phases of the software development loop does a coding agent own autonomously?
A completion model predicts the next tokens in a static file. A coding agent reads files, edits, runs tests, reads the output, and repairs until the suite passes.
Imagine two helpers writing a letter for you. The first is a great autocomplete: you start a sentence and it guesses the rest, but it never reads the finished letter or checks if it makes sense. The second helper actually reads your whole desk of papers, writes the letter, mails a draft, waits for a reply, and rewrites it based on what comes back. A code-completion model is the first helper. It fills in the next few lines wherever your cursor sits. A coding agent is the second one. It opens the project files, makes a change, runs the tests, reads the errors that come back, and fixes them, looping until the tests pass. The loop and the feedback are the difference. One guesses once; the other tries, checks, and tries again.
Detailed answer & concept explanation~8 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
Open with the architectural contrast: a single forward pass over static context versus an LLM in a loop with tools. Name the read, edit, run tests, repair cycle, stress execution feedback as the defining capability, then cover repo navigation, diff-grounded edits, and sandboxed execution, and close on what a SWE-bench harness actually scores.
Real products, models, and research that use this idea.
- SWE-bench gives an agent a real GitHub issue and repository and scores whether its patch passes the hidden test suite, which is now the headline metric for coding agents.
- Cursor's agent mode and Claude Code both read files, apply diff-based edits, run the test runner in a shell, and loop on the failures until the suite is green.
- Aider grounds every edit in the real file by applying unified diffs against current line ranges and commits passing changes to git, so a bad edit is easy to revert.
- Devin runs its edit, test, and debug loop inside a sandboxed workspace with its own shell, browser, and editor, isolating model-generated commands from the host.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does a coding agent find the right files to edit in a repository far larger than its context window?
QWhy must edits be applied as diffs against the real file rather than as full-file rewrites from the model's memory?
QA SWE-bench agent makes all visible tests pass but the fix is still wrong. What went wrong and how do you catch it?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Calling Copilot inline suggestions an agent. Completion is a single forward pass over a static buffer. It never runs the code or reacts to test output, so there is no repair loop.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.