How to use Cursor Agent mode: start a repo task and review diffs

Open Agent, assign one bounded repo task, then read the diffs yourself before anything stays.

The repo is already open in Cursor. You want the model to work — without accepting a stack of unread diffs. Official help calls this path Agent mode: start a chat, give one repo task, then read every file it touches.

The searchable job is how to use Cursor Agent mode: open the Agent panel, stay out of read-only Ask, write a bounded task, and decide in the diff view what stays. Shortcuts and review steps below follow cursor.com/help/ai-features/agent.

⌘IMac opens Agent; Ctrl+I on Windows/Linux
4Modes: Agent, Ask, Plan, Debug
1One repo task per new chat

Pick the mode that is allowed to edit

Agent writes

It searches the tree, edits many files, runs a shell, and can stop to fix errors. The outcome is a patch you review, then keep.

Ask only reads

Ask answers questions and will not edit. If the panel sits on Ask, you get an explanation and an empty diff. Shift+Tab cycles modes; the dropdown does the same.

ModeUse whenEdits files?
AgentA feature, refactor, or fix you will reviewYes
AskYou only want to understand the treeNo
PlanA large multi-file change that needs a plan firstAfter you approve the plan
DebugA bug that needs runtime evidenceYes

One pass: start, assign, review

  1. 01
    Open the Agent panel

    In a folder that is already a git repo, press Cmd+I (Mac) or Ctrl+I (Windows/Linux). Confirm the picker says Agent. Start a new chat if the last thread was a different job. Official help: each mode has its own context; a fresh chat is cleaner when the task changes.

  2. 02
    Give one bounded repo task

    Name the outcome, the files or area, and how you will know it worked. Example: add a null check in src/auth/session.ts and run the existing unit test. Do not paste five unrelated chores. The official example is one concrete request.

  3. 03
    Watch the diff view

    Press Return. Agent explores, then applies edits as it works. Files open in the diff view. Hit Stop if it leaves the folder you named. Queue a follow-up; it waits until the current run finishes.

  4. 04
    Review, then keep or reject

    Read added and deleted lines. Reject hunks you do not want. Hover an earlier message and use Restore Checkpoint to roll back file changes after that point — the chat remains. Run your tests yourself; a green line in the agent log is not acceptance.

Add a guard in src/auth/session.ts so a missing
user id returns 401. Do not touch the billing
folder. Run the existing session unit test and
stop if it fails.

Where first tasks usually break

The panel was on Ask
No files change. Switch to Agent with Shift+Tab or the mode picker, then send the same prompt again.
The prompt named no boundary
Agent will search widely. Name the directory, the test, and what it must not edit.
You accepted the whole stack
Reject stray files. Check deletions. If the shape is wrong, restore a checkpoint instead of stacking a second rewrite on a bad patch.

One task, one chat, then read the diff. The accept button is not a review.

Cloud Agents are a different door

cursor.com/agents can run a Cloud Agent from the browser. The desktop loop in this guide still applies: you own the review. Do not merge unread diffs from either path.

If two people need to agree on a refactor before anyone ships, put the file list and the risky hunks on one page. A short oakmeet room is enough — browser, a space code, no account. Room limits are in eight people, about an hour.

Is Agent the same as Composer or Chat?

Cursor’s current help names Agent as the assistant that can edit and run commands. Older UI copy said Composer. If your build still shows Composer, pick the mode that is allowed to edit files, not the read-only Ask/Chat mode.

Do I need a Cursor account and a paid plan?

You need to be signed in. Agent usage follows your Cursor plan and model limits. Check cursor.com/docs for current plans. This page does not sell a plan.

Can I undo after I accepted a diff?

Use Restore Checkpoint on an earlier agent message to revert file changes after that point. git checkout / git restore still cover anything already on disk. Restore does not wipe the conversation.

Should I start in Plan mode instead?

For a large multi-file change, Cursor’s table says Plan first: you approve the approach, then it may edit. For a single, well-bounded repo task, Agent is the path this tutorial walks.

Start a room