
How to hand a change to Cursor without losing control (2026)
Cursor is not a chat with syntax highlighting. It is an editor where a model can apply a patch. The difference between «it saved me an hour» and «it wrecked main» is scope and review. This flow assumes you already ship code. If you cannot read diffs, stop here and come back later.
The problem it solves
The usual prompt («fix login and improve the code») yields a 40-file PR, weaker tests and a convincing write-up. The model optimizes for «looks done». You have to optimize for «I can revert and explain every hunk».
What you will learn
- Set up a branch, a repro and a job with a file list
- Demand a plan before the agent edits
- Review the diff like a PR (names, tests, side effects)
- Catch the «tests are green» trick when assertions were deleted
- Know when to stop the agent and when the job belongs to Hermes or a human
Before you start
- Cursor installed (cursor.com) and a repo that already opens and runs locally
- Git: you can create a branch and revert / checkout a file
- A real, scoped change: a reproduced bug or a one- or two-file feature. Not «migrate auth»
- A way to know it is done: a test, a script or a 60-second manual repro
- 28 minutes on a branch that is not main
Steps 1
Isolate the work: branch, repro, done-when
Create a `fix/…` or `feat/…` branch from a clean main. Reproduce the bug or the happy path locally and write down the command (`pnpm test auth`, «open /login and submit empty»). Write the done-when in one line: «test X passes» or «the form shows the error and does not POST». If you cannot reproduce it, the agent cannot know it is finished. Do not open Agent yet.
What you should see: Git on a new branch, the repro command run once, and a done-when line in a scratch pad or in a chat you have not sent.
Steps 2
Write the job with a scope (and a do-not-touch list)
Open Agent and paste a block like this:
- Outcome: [done-when from step 1] - Files you may touch: `src/…` (3 paths max) - Do not touch: global snapshot tests, CI config, `.env`, generated files - No drive-by refactors or renames - If you need more files, STOP and ask
Attach the error or the failing test. Do not paste «act like a senior». The model already tries to sound like one. What it lacks is your map of landmines.
What you should see: The Agent panel with the scope block visible, 1–3 paths, and the stack trace or test in the same message. No edits applied yet.
Steps 3
Demand a five-line plan before the first patch
Add at the end: «Before you edit, write a 5-line plan: likely cause, files, test you will run, risk. Wait for my OK.» Read the plan. If it proposes a rewrite, a library swap or «simplifying» half a folder, say no and cut it down. If the plan is «change the guard in X, add a case in test Y», OK it. This is the cheap place to stop. A large diff is not.
What you should see: A short plan in the chat and your «OK, go» or «no, only file X». No files changed yet, unless you allowed it.
Steps 4
Review the diff as if you did not write it
Open every touched file. Ask three things: does this hunk serve the done-when? Did a test get easier to pass (asserts removed, `toBeTruthy()` where a value lived)? Side effects (I/O, auth, dates, flags)? Read the agent’s explanation after the diff, not before: the paragraph always sounds reasonable. If you do not understand a hunk, do not accept it. Ask it to split the change or discard that file.
What you should see: A diff view with 1–3 files, hunks you can explain out loud, tests that gained assertions or stayed as strict.
Steps 5
Run the done-when yourself (do not trust the chat’s «all green»)
Run the same command from step 1 in your terminal, not only the one the agent claims it ran. If it passes, do the 60-second manual path. If it fails, paste the output and narrow: «touch no more files; fix this error». If it passes in a weird way (shorter test, snapshot updated to a nonsense value), treat the change as suspect: revert the test and ask it to fix the code, not the expect.
What you should see: Your terminal, not the agent’s, with the repro command green or with an error you just pasted back.
Steps 6
Close: a small commit, or revert; pick the next job
If the done-when holds and the diff is defensible, commit on the branch with a message that states the outcome, not «wip agent». If you are not convinced, `git checkout --` the files or reset the branch. Do not «just fix a bit more» in the same thread: the context is already dirty. Open a new Agent with a smaller job. If the next job is an agent outside the IDE (cron, Telegram, a cloud machine), that is Hermes or Grok Bot — not another lap in this chat.
What you should see: Either a clean commit on the feature branch, or a clean working tree after revert. The Agent thread treated as closed.
Real use cases
A bug with a test that already fails
Reproduced, 2 files, 5-line plan, 30-line diff. The test gains a case, it does not lose one. Commit in 25 minutes.
Explaining someone else’s module
That is Chat (Ask), not Agent. Questions pinned to files. Zero writes. Then, if there is a change, open Agent with a scope.
A one-off script
New file under `/scripts`, not mixed into the app. The agent does not «helpfully» refactor the core.
Common mistakes
«Fix the app»
There is no done-when. The agent will pick the flashiest rewrite. You inherit the risk.
Accepting a weaker test
If the test diff deletes assertions, green is a lie. Always read the test file.
Reusing the same thread for a second job
Context drags the first plan along. New Agent, new scope.
Delegating what you could not review
Crypto, auth, migrations, payments. If you cannot read the hunk, it is a bad Agent candidate.
Close
Cursor speeds up people who can already reject a diff. The method is boring on purpose: branch, scope, plan, review, your test, small commit. The day you skip the plan «because it is a one-line change» is the day the rewrite sneaks in. Return to scope.
Next steps
- Run the flow on a second bug, smaller than the first.
- If you want the same job outside the editor (CLI, gateway), continue with Hermes Agent.
- If the work is not the repo but a browser and an inbox, Grok Bot is a different profile — do not mix it into this thread.
Free guide
Want the 15-tools guide?
We send it free. We will also ping you when the next guide in this path goes out.
Unsubscribe whenever you want. We do not sell the list.
Part of the path Build with agents