Agent branch picker: allow “switch and keep uncommitted changes” like git checkout

Feature request for product/service

Cursor IDE

Describe the request

When I start a new local agent session and select a different branch (e.g. main) while the workspace has uncommitted changes on the current feature branch, Cursor forces me to Discard or Commit those changes. There is no option to just switch branches and keep the dirty working tree.

That is unnecessarily strict. In a normal terminal, git checkout main often succeeds with uncommitted changes intact when there is no conflict. My current workaround is exactly that: open the terminal, run git checkout main, and continue. Cursor could do the same thing for me.

Why this is painful

  • I hit this constantly when jumping between feature WIP and a fresh agent on main
  • Discard is dangerous; Commit is often the wrong action for unfinished work
  • The only safe UI path today is cancel → manual terminal checkout → retry
  • Worktrees/cloud agents are useful isolation tools, but overkill for “just check out main and leave my dirty files alone”

Requested options in the dirty-tree branch-switch dialog

  1. Switch and keep changes — equivalent to a normal non-conflicting git checkout <branch> that carries the working tree
  2. Stash and switch (nice-to-have) — stash, checkout, leave stash for later
  3. Keep existing Commit / Discard for people who want a clean tree

If Git would refuse the checkout due to conflicts, show that error and fall back to stash/commit/discard — don’t pretend carry-over is always unsafe.

Expected behavior
Selecting main for a new agent should be able to perform a normal git checkout main when Git allows it, without forcing me to destroy or commit WIP first.

Operating System (if it applies)

MacOS

Hey there! When the agent branch picker sees uncommitted changes, it only offers Discard or Commit today, with no “keep changes and switch” path like a normal git checkout when there’s no conflict. We’ve let the team know and this is something we’re tracking. Workaround for now: cancel the picker, run git checkout <branch> in the terminal, then start the agent again. I’ll post here if there’s an update.