What is AI pair programming?
AI pair programming is writing code with an AI model beside you in the editor: it reads what you are working on and suggests the next line, a whole function or a fix, and you accept, edit or reject it. GitHub introduced Copilot as an AI pair programmer in 2021; agents that finish tasks alone are the next step.
Part of Glossary: the terms behind MCP, coding agents and shared pages, defined plainly.
You write in your usual editor. The assistant watches the file you are editing, where your cursor is, and often the files around it.
It sends that context to a model and shows the model's suggestion inline, anywhere from one line to a whole function.
You accept it, change it or keep typing past it. Nothing enters the file without you.
Chat and inline edits run the same loop at a larger grain: you ask for a change, it proposes a diff, you review the diff.
Hand the assistant a whole task to finish on its own and you have moved from pair programming to agentic coding.
Source: GitHub blog: Introducing GitHub Copilot, your AI pair programmer
Pair programming versus agentic coding
The phrase comes from GitHub's launch of Copilot on 29 June 2021, which Nat Friedman described as "a new AI pair programmer that helps you write better code". The model behind it was OpenAI Codex, trained on a far larger share of public source code than GPT-3, and the preview worked especially well for Python, JavaScript, TypeScript, Ruby and Go. The metaphor was deliberate. In pair programming one person drives and one navigates; Copilot cast the model as a partner who watches you type and offers the next few lines.
That framing still describes a specific way of working, and it is worth keeping distinct from what came after. In pair programming the unit of work is a suggestion, and the human accepts or rejects each one with the code in view. In agentic coding the unit of work is a task: you describe the outcome, the agent reads files, runs commands, edits and tests, and you review the result at the end. The first keeps you in the loop on every line. The second asks you to review a diff, or a pull request, after the fact.
Example: filling in a function
You type a signature, def parse_duration(text: str) -> int:, and pause. The assistant has the signature, the module's imports and the test file open in the next tab. It proposes a body that handles "90s", "2m" and "1h30m" because the tests mention those. You read it, notice it returns minutes where the tests expect seconds, fix the multiplier and move on. That exchange is the whole method: the model supplies a plausible draft fast, and you supply the judgment about whether it is right. The same loop at a coarser grain is inline edit, where you select a block, say what should change, and read the diff before it applies.
Why it still matters
Agents get the attention now, but the pairing mode has properties agents give up. You learn the codebase as you go, because you read every line as it appears. Errors are caught where they are cheapest, at the moment of writing rather than in review. And the assistant's context is exactly your context: the file, the cursor, the neighbouring code, nothing it had to go and find. For unfamiliar APIs, a suggestion in place teaches faster than documentation.
The weakness is scale. Suggestions cannot restructure a module or run the tests, and accepting them one at a time is slow for work you already understand. Teams tend to pair for the code that needs thought and delegate the rest.
Common mistakes
- Accepting on rhythm. Tab becomes a reflex. Read the suggestion, especially the boring parts, since a wrong constant looks exactly like a right one.
- Starving the assistant of context. It suggests from what is open. Keep the test, the type definitions or a similar function visible and the proposals improve.
- Treating a confident suggestion as a tested one. It compiles in the model's head, not in yours. Run it.
- Mistaking it for review. A pair that only ever proposes code is not checking yours. Code review, by a person or an agent, is a separate step.
FAQ
- Is AI pair programming the same as vibe coding?
- No. In pair programming you read and own every line the assistant proposes. In vibe coding you describe what you want, accept what comes back and judge it by whether it runs. The tools overlap; the discipline does not.
- Does AI pair programming replace a human pair?
- It replaces the typing half, not the thinking half. A human pair questions your design and notices what you skipped. An assistant proposes code that fits the context it was shown. Many teams do both: a person for the decisions, the assistant for the keystrokes.
- Which tools count as AI pair programming?
- Anything that suggests code while you write and waits for you to accept: inline completions, a chat panel that proposes a snippet, an inline edit that shows you a diff. GitHub Copilot is the original example. Once the same tools run a task end to end without you, they are acting as coding agents.
Stop sending HTMLover Slack.
Create an account in a minute, connect your coding agent, and make your first board.