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

**URL:** <https://forum.cursor.com/t/agent-branch-picker-allow-switch-and-keep-uncommitted-changes-like-git-checkout/167341>\
**Category:** Feature Requests\
**Created:** [August 3, 2026, 6:20pm UTC](https://forum.cursor.com/t/agent-branch-picker-allow-switch-and-keep-uncommitted-changes-like-git-checkout/167341 "2026-08-03T18:20:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marckohlbrugge](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/marckohlbrugge/32/116518_2.png) [@marckohlbrugge](https://forum.cursor.com/u/marckohlbrugge)\
**Post date:** [August 3, 2026, 6:20pm UTC](https://forum.cursor.com/t/agent-branch-picker-allow-switch-and-keep-uncommitted-changes-like-git-checkout/167341/1 "2026-08-03T18:20:49Z")

</div>

### 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

---

<div class="post-metadata">

**Author:** ![mohitjain](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/mohitjain/32/100229_2.png) [@mohitjain](https://forum.cursor.com/u/mohitjain)\
**Post date:** [August 5, 2026, 12:23pm UTC](https://forum.cursor.com/t/agent-branch-picker-allow-switch-and-keep-uncommitted-changes-like-git-checkout/167341/5 "2026-08-05T12:23:31Z")

</div>

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.
