[FEATURE] Detect git branch switches mid-conversation and warn the user

Resolved 💬 4 comments Opened Feb 24, 2026 by bertleunis Closed Mar 24, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When I switch branches while in a chat with Claude the conversation and actual code can be mismatched. A warning from Claude that this might be the case, during the conversation, might help to prevent confusion and duplicate work.

Proposed Solution

A few things that would help:

  1. Branch awareness at conversation start — Claude Code already captures the branch in gitStatus at the start, but it's a snapshot. Detecting a branch switch mid-conversation and warning ("You switched from branch-A to

branch-B — the context of our conversation may no longer match the code") would be very valuable.

  1. Periodic git state checks — Before making edits, verifying the branch hasn't changed since the conversation started.
  1. Branch-scoped conversations — Tying a conversation to a branch so you get prompted when there's a mismatch.

Alternative Solutions

_No response_

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

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