# AI pair programming

> Canonical: https://skillalmanac.com/glossary/ai-pair-programming | Last verified: 2026-11-24 | Index status: not offered to search engines

AI pair programming is working on code alongside an AI tool that suggests, explains and reviews code while you write it, the way a human partner would, with the person still deciding what goes in.

Also called: AI pair programmer, pair programming with AI, AI pair programming tools, pair programming AI.

## In plain language

Pair programming normally means two people at one keyboard, one writing and one watching and questioning. In AI pair programming the second seat is an AI tool. It suggests the next lines as you type, answers questions about the code in a chat panel, and can look over a change and point out problems. You stay the driver: you accept, change or reject what it offers. Like a human partner it can be wrong, and it does not know your project's history unless it is shown the files. Accepting suggestions without reading them is the main risk. Some tools also carry a monthly or per-use cost, depending on the plan.

## Technical definition

AI pair programming usually runs inside an editor or terminal. The tool sends the surrounding code and your request to a language model, which returns a completion, an answer or an edit that you review and apply. GitHub's documentation says Copilot suggests code as you type and can answer questions about files and repositories, and that available features depend on your plan, client and organization's policies. A 2023 arXiv paper by Peng and colleagues, a controlled experiment with developers, calls GitHub Copilot an AI pair programmer. The term differs from agentic modes, where the tool acts across several steps: in pairing, the person normally keeps the keyboard and the pace.

## How it shows up when you use agents

With a tool like GitHub Copilot, pairing happens in the editor: it offers completions while you type, and you ask the chat panel about a function or an error. You decide what to accept. With a terminal tool such as Claude Code you can also work in a pairing style, by asking for one small change at a time and reading each diff before the next request.

What breaks when it is misunderstood: accepting suggestions you have not read, so mistakes enter the code under your name, or expecting the partner to remember decisions from an earlier session. A [large language model](/glossary/large-language-model) sees what is put in front of it, which is why [instruction files](/glossary/agent-instruction-file) and pointing it at the right files matter.

Next action: pick one habit from the example cards. Ask for a review of finished work with [requesting-code-review](/skills/obra/requesting-code-review), or work test-first with [tdd](/skills/mattpocock/tdd), so a failing test, not a confident-sounding answer, tells you whether the change is right. When the tool starts editing many files and running commands on its own, you have moved from pairing toward a [coding agent](/glossary/coding-agent).

## Common confusions

- **AI pair programming versus a coding agent.** In pairing, the person keeps the keyboard and applies each change. A coding agent takes a goal and acts across files and commands. See [Coding agent](/glossary/coding-agent).
- **AI pair programming versus vibe coding.** Pairing assumes you read and judge the code the partner offers. Vibe coding is usually described as accepting the output without close review. See [Vibe coding](/glossary/vibe-coding).
- **AI pair programming versus human pair programming.** See [Context window](/glossary/context-window) for what the AI partner can see.
- **Myth.** A suggestion that compiles is correct. The tool can produce code that runs and is still wrong, and tests and review are how you find out.

## Worked examples in this catalogue

### [GitHub Copilot](https://skillalmanac.com/tools/github-copilot)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: According to GitHub's documentation, Copilot suggests code as you type, answers questions about files, repositories and development concepts, and can review code. You review and apply each suggestion.

Why it exercises the concept: The documentation describes the suggest, answer and review roles that a pairing partner plays, in the editor where you are writing.

### [requesting-code-review](https://skillalmanac.com/skills/obra/requesting-code-review)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A request for a review of finished work against the requirements before merging.

Why it exercises the concept: It models the reviewing half of pairing: a second reader checks finished work against what was asked, before it is merged.

### [tdd](https://skillalmanac.com/skills/mattpocock/tdd)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A feature built or a bug fixed test-first, in a red, green, refactor loop.

Why it exercises the concept: Test-first work gives a pair a shared rhythm of one failing test, then one change to pass it, so the person can read each small step.

### [AI Coding Assistant vs Coding Agent: What Each Can Change](https://skillalmanac.com/learn/ai-coding-assistant-vs-coding-agent)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A comparison of autocomplete, chat and an agent by what each may change, so you can tell when a pairing tool becomes one that acts on its own.

Why it exercises the concept: It marks the boundary between pairing, where you apply changes yourself, and an agent that edits files and runs commands.

## Related terms

- [Coding agent](https://skillalmanac.com/glossary/coding-agent.md)
- [AI copilot](https://skillalmanac.com/glossary/ai-copilot.md)
- [Vibe coding](https://skillalmanac.com/glossary/vibe-coding.md)
- [Large language model (LLM)](https://skillalmanac.com/glossary/large-language-model.md)
- [Human in the loop (HITL)](https://skillalmanac.com/glossary/human-in-the-loop.md)

## Sources

- [About GitHub Copilot](https://docs.github.com/en/copilot/get-started/about-github-copilot), GitHub (accessed 2026-11-24)
- [The Impact of AI on Developer Productivity: Evidence from GitHub Copilot](https://arxiv.org/abs/2302.06590), arXiv (Peng et al.) (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-24. [Glossary index](https://skillalmanac.com/glossary.md).
