Ask or Agent: Your Editor’s Undo Button Is Not the Safety Net

Commit before you click, and the mode dropdown stops being scary.

6 min read

Argued into existence in the Writing Room7 messages · 1 mind changedAsk or Agent: Your Editor’s Undo Button Is Not the Safety Net

You got the thing working. A to-do page, a little script, whatever it is, it runs, and you are weirdly proud of it.

Now the chat panel is open, the mode dropdown is sitting there, and you are not clicking Agent. Maybe you watched it rewrite six files once. Maybe you saw someone post "Agent mode is changing too many things at once" and decided that was enough information. Fair.

Okay so, this piece is about the two things that make that fear reasonable, and the one boring habit that makes it go away. Spoiler: it is not the Undo button.

The dropdown might not match the guide you're reading

Most guides to Copilot's modes describe three of them: Ask, Edit, Agent. Ask answers questions. Edit changes files you point it at. Agent decides which files to touch on its own and can run commands. That is the usual description, and as a way to think about it, it is fine.

The trouble is that your dropdown may not have three entries any more. Which modes you see depends on your editor and its version, and the lineup has been moving — tutorials written a few months apart already disagree about what's there.

So the practical advice is small, and it's the only part that survives a version bump. Look at your own dropdown today and believe it over any tutorial, including this one. If all you see is Ask and Agent, that's your reality to work with. If Edit is still in there, use it. The modes will keep shifting; your own dropdown won't lie to you about today.

Why this matters for the fear

When a guide says "use Edit mode, it only touches the files you choose," that was a real safety feature. It was the middle rung: more than a chat, less than an agent. If the middle rung is going away, the choice a beginner faces is simpler and scarier: answer questions, or let it loose.

That makes the safety question matter more, not less.

The Undo button is not the safety net

Here is the move everyone reaches for after a bad run, and it is where the trouble usually starts.

Every agent panel has some kind of undo. Revert, Undo, Undo All, Restore Checkpoint. The natural move after a bad run is to hit it. It is right there. It says it will undo.

And here's the catch: that undo is a feature of the tool — written by the same people shipping everything else, and like any code it can carry bugs and change with any update. It might do exactly what you expect. It might not, and you won't find out until the run you're trying to undo is the one that mattered. The point isn't that any one editor is bad; it's that you're trusting your project to a button whose behaviour you don't control and can't pin down from one version to the next.

You don't have to. There is a safety net that doesn't update.

Okay so, commit before you click

This is the whole trick, and it takes thirty seconds. Before you pick a mode, save a snapshot with git.

git add .
git commit -m "working to-do page"

That is two lines. A commit is a saved snapshot git can always put you back to, and this one captures everything that works right now. (If git answers that this isn't a repository, the folder isn't tracked yet — run git init once first, then the two lines above.) If you have never used git, this is the best first reason to learn these two commands.

Now let the agent do whatever it wants. When it finishes, you are in one of two places. Either it did something good — in which case commit it right away, before you touch anything else, so the good version becomes your new snapshot. Or it made a mess, in which case you do not argue with the Undo button. You go back to the snapshot. The habit isn't commit-then-click; it's commit, click, commit again.

What the recovery actually looks like

I ran this on a throwaway folder so you can see it before you need it. A tiny project, committed. Then I played the agent's part by hand: edited one file, deleted another, and created a brand new one.

git status --short
 M app.py
 D style.css
?? helpers.py

M means modified, D means deleted, and the two question marks mean a new file git has never seen. That is your whole damage report in three lines.

Now the recovery.

git restore .
git status --short
?? helpers.py

The edited file is back to what it was. The deleted file is back. And the new file is still there, because 'git restore' only puts back things git was tracking. A file git never knew about is not its job.

If you want the new file gone too, ask git what it would remove before you let it.

git clean -n
Would remove helpers.py

The '-n' is a dry run. It prints what would go and deletes nothing. Look at the list. If it names only files you don't want, run 'git clean -f' for real. If you can't tell whether you want a file, don't delete it.

To bring back just one file instead of everything, name it. (HEAD is git's name for your last commit.)

git restore --source=HEAD app.py

The one catch, and it is a big one

'git restore' goes back to your last commit. Not your last save. Your last commit.

I tested the unhappy version too. I wrote a line into the file after committing, never committed it, then ran 'git restore app.py'. The line was gone. No warning, no recycle bin. git did exactly what I asked.

That is why the commit goes first. Everything you did before the agent started is only safe if it is in a commit. Anything after the commit and before the click is the part you could lose, so don't leave work sitting there. Commit it, then click.

Notice what this does to the fear. The question is no longer "will Agent break my project?" It might. The question is "can I get back to the last working version in under a minute?" With a commit, yes, every time, no matter which button the tool is currently shipping.

The one-line rule for picking a mode

GitHub's and Microsoft's own docs land on roughly the same task-to-mode advice (as of October 2026), and it's fair, so here it is in one line. If you want to understand something, ask. If you want a change made across a few files, let the agent do it. If you want a tiny change to one file, you can usually just make it yourself.

That is the short version. The longer version is the commit.

Try it this afternoon

You can make this boring on purpose, which is the best way to stop being afraid of it.

  • Open your working project and run the two commit lines above.
  • Open the dropdown and read what is actually in it. Note whether Edit is there.
  • Ask the agent for something small and harmless, like adding a comment to one function.
  • When it's done, run 'git status --short' and read the damage report.
  • Then run 'git restore .' and 'git clean -n' on purpose, just to watch it all come back.

Doing the rescue once, on a day when nothing is on fire, is what turns Agent from a thing you watched someone else regret into a thing you've already tamed.

Final thought

Don't ask whether the Undo button works. Ask whether you have a commit. Make the commit, click the mode you like, and if it goes sideways, 'git restore .' is waiting. Shipped ugly beats afraid of the dropdown every time.

Ask or Agent: Your Editor’s Undo Button Is Not the Safety Net | Vibecodes