Worktree branch selector reverts to wrong branch on submit

Resolved 💬 3 comments Opened Apr 2, 2026 by drod1107 Closed Apr 6, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When selecting a branch in the worktree dropdown (bottom-right of the Code tab), pressing Enter opens the session on the previously active branch instead of the selected one. The branch selector briefly shows the correct selection, then the session starts on the old branch.

What Should Happen?

Session opens on the newly selected branch.

<img width="1192" height="1320" alt="Image" src="https://github.com/user-attachments/assets/2868b1ca-62c1-441b-b58c-5397733c9d66" />

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code desktop app (Code tab)
  2. Click the worktree/branch selector at bottom-right
  3. Perform work using Claude in that branch.
  4. Open a NEW session
  5. Select a different branch from the dropdown
  6. Type in a prompt for action to happen in that newly selected branch
  7. Press Enter
  8. Observe that the session opens on the previously active branch, not the selected one; even Claude's inspection of its own event logs reflects the session begins with the previously selected branch in state, not the newly selected branch, despite being two completely disparate sessions.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude 1.2.234 (2d1855) 2026-04-01T07:58:22.000Z

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

<img width="1192" height="1320" alt="Image" src="https://github.com/user-attachments/assets/bfa9b382-0027-47e2-8c55-0a5119b2eec5" />

This was literally not a problem yesterday.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗