Agents
AI Pair Programming in Cursor: How It Works
AI pair programming in Cursor puts you and a coding agent on the same task. You describe the work; the agent reads your codebase, changes files, runs shell commands and fixes errors it hits. You review what it generates, give feedback, and the two of you converge on the right solution.
On this page
How does AI pair programming work in Cursor?
Cursor describes it as working alongside a coworker: you describe your task, and the agent reads your codebase, makes changes to files, runs shell commands, and automatically fixes any errors it hits. Then you review the code, give feedback, and work together to arrive at the right solution.
The self-correction clause is the part worth noticing. An agent that runs a command and reads the error can fix its own broken build before you ever see it. What reaches your review is usually a working change, which is a different reviewing job than reading a suggestion that has never been executed.
The agent fixing its own compile error says nothing about whether the change is the one you wanted. Read the diff, not just the green check.
This is covered hands-on in Agent Mode Foundations — 6 short modules, free to read.
What is an AI coding assistant?
An AI coding assistant is software that helps you build software using large language models. In Cursor that assistant is an agent, which is a narrower claim than it sounds: you give it a goal and it plans and carries out the work, rather than only answering questions.
Cursor works with every frontier model and tunes its harness to each one to get the most out of it, so the assistant is not a single model with a single personality. If you want to see how the models compare rather than take the claim on trust, Cursor publishes results on the CursorBenchCursor's internal benchmark that scores models on both task performance and token efficiency, not accuracy alone. Press Enter for the full definition. page.
How do I pair program with Cursor?
Four steps, and the last one is the one people skip. Cursor's documented sequence ends at the pull request, not at the working diff.
- 1Open the agent with Cmd + I.
- 2Describe your task, referencing files as needed.
- 3Review the output from the agent, and reply with feedback to refine.
- 4Ask Cursor to create a pull request to finish your work.
Step two is where most of the quality comes from. Referencing files means typing @ and naming them, which is how you stop the agent guessing at which component you meant.
When should I use Ask or Plan mode instead?
Pair programming as Cursor describes it is Agent modeCursor's full-capability mode: the AI can read the codebase, write and edit files, move them and run terminal commands. Contrast with Ask mode, which is read-only. Press Enter for the full definition.: you and the agent both changing the same code. The two neighbouring modes exist because not every task wants a file edit as its first move.
- Mode
- Agent
- What it does
- Reads the codebase, edits files, runs commands, fixes its own errors
- Reach for it when
- You want the change made
- Mode
- Ask
- What it does
- Answers questions about the code without editing it
- Reach for it when
- You want to understand before you change anything
- Mode
- Plan
- What it does
- Produces the approach before code is written
- Reach for it when
- The task is large enough that a wrong approach is expensive
| Mode | What it does | Reach for it when |
|---|---|---|
| Agent | Reads the codebase, edits files, runs commands, fixes its own errors | You want the change made |
| Ask | Answers questions about the code without editing it | You want to understand before you change anything |
| Plan | Produces the approach before code is written | The task is large enough that a wrong approach is expensive |
The three modes Cursor links from its pair-programming page.
Frequently asked questions
What is AI pair programming in Cursor?
You and a coding agent work the same task together. You describe the task; the agent reads your codebase, changes files, runs shell commands and fixes errors it hits. You review the result, give feedback, and iterate to the right solution.
What is the shortcut to open the agent?
Cmd + I opens the agent. Describe your task and reference the relevant files with @ so the agent does not have to guess which ones you meant.
Does the agent open the pull request too?
Yes. Cursor's documented last step is asking it to create a pull request to finish the work.
Which model does Cursor use for this?
Cursor works with every frontier model and tunes its harness to each one. Model comparisons are published on the CursorBench page rather than asserted in the product.
Sources & last verified
Cursor ships frequently. Facts verified against primary sources on July 27, 2026.
Keep reading
Rather do it than read about it? Run 11 interactive Cursor walkthroughs in a simulated editor. Free, no account needed.