skip to content

In Cursor, how are changes from a Cmd/Ctrl+K inline edit and from Agent each refined, accepted or rejected?

level: middleimportance: nice to knowfreq 5%

answer

  1. two surfaces, two review flows
  2. inline: Return applies, follow-up refines
  3. Agent edits land as it works
  4. Cmd+Return accepts all, Cmd+Shift+Backspace rejects
  5. same keys, different focus

basics

~20 s

Cursor's inline edit applies the instruction to the selection on Return; a follow-up plus Return refines it, and Cmd+Shift+Backspace cancels. Agent's edits appear in the diff view as it works; with changes pending, Cmd+Return accepts all and Cmd+Shift+Backspace rejects all.

solid answer

~40 s

On **inline edit**, Return submits the instruction and Cursor applies the edit to the selected code; to change the result you add a follow-up instruction and press Return again, and the keyboard reference lists `Cmd+Shift+Backspace` as the inline edit's Cancel. On **Agent** — for example after sending the selection with `Cmd/Ctrl+L` — edits are applied as Agent works and shown in the diff view, where you review them and reject anything you do not want; with suggested changes pending in the chat, `Cmd+Return` accepts all and `Cmd+Shift+Backspace` rejects all. The keys are contextual: the same `Cmd+Shift+Backspace` cancels a generation when you are typing in chat. Rolling back further than a pending set is Agent's checkpoint feature, which reverts files and keeps the messages.

go deeper

for a junior

Recall the inline flow: Return applies the edit to the selection, a follow-up plus Return refines it, and Cmd+Shift+Backspace cancels.

for a middle

Explain that Agent applies edits as it works and you review them in the diff view, with Cmd+Return and Cmd+Shift+Backspace accepting or rejecting the pending set.

for a senior

Point out that the same keys change meaning with focus, and that checkpoints are Agent's rollback, separate from Git. Show how you would review a set without rejecting good parts.

for a principal

Use the Agent Edits chart's suggested-versus-accepted data to judge whether the team picks the right surface, rather than counting usage alone.

## Two review flows, one editor Cursor's two selection-driven surfaces end differently. **Inline edit** (`Cmd+K` on Mac, `Ctrl+K` on Windows/Linux) is a conversation with a single selection: you submit an instruction, Cursor applies the edit to the selected code, and you keep refining the same edit. **Agent** is a working session: its edits are applied while it works and you review them as a set. Knowing which flow you are in tells you which keys do what. The shortcut lists below are Cursor's keyboard reference, which prints Mac keys; every binding can be remapped in Keyboard Shortcuts (`Cmd R` then `Cmd S`). ## Inline edit: refine until it is right The help page and the keyboard reference together describe the inline flow: 1. `Cmd+K` opens the inline prompt on the selection. 2. Return submits; Cursor applies the edit to the selected code. 3. A follow-up instruction plus Return refines that same edit. 4. `Cmd+Shift+Backspace` is listed as **Cancel** for inline edit. Two more inline keys from the same table: `Cmd+Shift+K` toggles input focus, and `Opt+Return` asks a quick question instead of editing. The habit to build is refining rather than restarting: the second instruction starts from the first result, so the part that was right stays right. ## Agent: review the set, then accept or reject Agent's help page says its edits are applied as it works: "Watch edits appear in the diff view as they happen", then "review them in the diff view and reject anything you don't want." From the chat input, the keyboard reference gives whole-set shortcuts: | Key (Mac) | Context | Action | |---|---|---| | `Cmd+Return` | with suggested changes | Accept all changes | | `Cmd+Shift+Backspace` | with suggested changes | Reject all changes | | `Cmd+Return` | when typing | Force send message | | `Cmd+Shift+Backspace` | in the chat input | Cancel generation | | `Cmd+Shift+Backspace` | in inline edit | Cancel | The table is the trap: the same two keys accept, reject, send or cancel depending on where focus is and whether changes are pending. A developer who has learned `Cmd+Shift+Backspace` as "cancel" in inline edit should expect it to reject Agent's whole pending set when changes are waiting in chat. ## A walkthrough from a selection 1. Select the function and press `Cmd/Ctrl+L`; Agent opens with the selection as context. 2. Describe the change; Agent searches, edits the files it needs and shows the edits in the diff view as they happen. 3. Read the diff file by file and reject anything you do not want there. 4. When what remains is right, accept the pending changes — `Cmd+Return` from the chat input accepts all of them at once. The order matters: an accept-all shortcut is safe only after the parts you disagree with have been rejected. The inline equivalent is shorter because the change is one selection: read it in place, refine it with a follow-up if needed, or cancel. ## Going further back Accept and reject decide a pending set. Going back further is a different feature: Agent creates **checkpoints** before significant changes, and **Restore Checkpoint** on an earlier message reverts files — not messages — to that point. Checkpoints belong to Agent sessions and are kept apart from Git, which stays the tool for permanent history. ## What a team lead can see Cursor's team analytics include an **Agent Edits** chart showing the amount of code edited by Agent and by Cmd+K, and whether those changes were accepted, groupable by suggested versus accepted or by file extension. The team Admin API also reports `cmdkUsages`, the number of Cmd+K inline edit usages. Together they show whether inline edit is used, and how much of what it suggests survives review. - A high suggested-to-accepted gap on Cmd+K hints that instructions are too vague or the wrong surface is chosen. - A team that never uses Cmd+K may be sending one-line changes through full Agent runs. ## Common mistakes - Using Agent's checkpoints as permanent history instead of Git. - Hitting `Cmd+Return` to send a message while changes are pending and accepting all of them instead. - Rejecting a whole Agent set when only one file was wrong, instead of rejecting that part in the diff view. - Re-running an inline edit from scratch when a follow-up instruction would have refined it.

  • How can a Cursor team lead tell whether inline edits are being kept?
    The team analytics Agent Edits chart shows how much code Agent and Cmd+K edited and whether users accepted it, groupable by suggested versus accepted or by file extension. The Admin API's daily usage data carries `cmdkUsages`, the number of Cmd+K inline edit usages per user per day.
  • In Cursor, why can Cmd+Shift+Backspace surprise someone moving between inline edit and Agent?
    Its meaning depends on focus. Cursor's keyboard reference lists it as Cancel in inline edit, Cancel generation in the chat input, and Reject all changes when Agent's suggested changes are pending. The same reflex can discard a whole set of Agent edits.

  • Inline edit's result must be thrown away and redone to change it.
  • Agent waits for approval before writing any edit to a file.
  • Cmd+Return in Cursor's chat always sends the message, whatever is pending.
  • Cmd+Shift+Backspace means Cancel everywhere in Cursor.
  • Cursor offers no team-level view of whether Cmd+K edits are accepted.