[FEATURE]

Resolved 💬 3 comments Opened Jan 9, 2026 by maggiechew Closed Feb 23, 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

Title: Stale gitStatus snapshot causes over-complicated tool usage and incorrect branch assumptions

Description:

### Problem
Claude Code provides a gitStatus snapshot at conversation start, but this becomes stale if users switch branches. Claude treats this snapshot as current truth, leading to:

  • Incorrect branch assumptions
  • Over-complicated searches for simple file lookups
  • Questioning users instead of verifying live state

### Example
User on branch dt6-1148, but gitStatus showed dt6-1146. User asked for plan file in ~/.claude/plans/dt6-1148-*.md. Claude:

  • Ran 10+ searches across home directory
  • Read wrong plan files
  • Questioned user when corrected
  • Should have been: ls ~/.claude/plans/ → read file

Proposed Solution

### Suggested Fix
Add to system prompt:
gitStatus: Snapshot from session start - may be stale.
When branch context matters, verify with git branch --show-current

Or add a live GetGitStatus tool Claude can call when needed.

Environment: Linux, claude-sonnet-4-5, latest Claude Code
Priority: Medium (usability issue with workarounds)

Alternative Solutions

Workaround

Added custom instructions to ~/.claude/CLAUDE.md:

Session Start Protocol

The gitStatus snapshot at conversation start may be stale.

  1. When branch context matters for the task, verify current branch:

git branch --show-current

  1. For simple file lookups (known locations like ~/.claude/plans/):
  • Use ls first before complex searches
  • Read directly if path is known
  1. Trust user corrections immediately:
  • If user says "you're wrong about X", verify X right away
  • Don't question - just check and proceed

This instructs Claude to verify live branch state and use simpler commands, but requires each user to add custom instructions. A system-level fix would benefit all users.

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 3 comments on GitHub. Read the full discussion on GitHub ↗