[BUG] Phantom PR branch shown in UI that was never created

Resolved 💬 2 comments Opened Mar 1, 2026 by Evgenes Closed Mar 29, 2026

Bug description

When starting a Claude Code session, the system prompt includes a Main branch field like:

Main branch (you will usually use this for PRs): claude/some-random-id

This branch does not actually exist — neither locally nor on the remote. Running git branch -a confirms it's absent. However, it appears in the UI as a suggested PR target (e.g., claude/some-id ← main), which is confusing because it implies the branch was already created.

Steps to reproduce

  1. Open a project with Claude Code (git repo on main branch)
  2. Note the Main branch value in the session header
  3. Run git branch -a — the branch does not exist
  4. The UI still shows it as if it's a real branch with a PR relationship

Expected behavior

Either:

  • Don't show a branch name until it's actually created
  • Or clearly label it as "suggested branch name" rather than displaying it as an existing branch

Environment

  • Claude Code CLI
  • macOS (Darwin, ARM64)
  • Git repository with only main branch

View original on GitHub ↗

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