Git-Status Cache Bust
- Entity ID:
ent-20260423-r31a000000021 - Type:
concept - Scope:
private - Status:
active
Description
Architectural anti-pattern where git status is embedded in the second prompt-cache block {system-prompt | ~/.claude/claude.md | git-status}. Because git status changes on every commit, every staged file, and every checkout, block 2 is invalidated on each git action, which cascades to block 3. Result: every new session after any git activity starts with a completely cold prompt cache, re-paying full cache_creation_input_tokens. Filed as GitHub #47098.
Key claims
- Every git commit busts Claude Code's prompt cache
- Git-status cache-bust costs ~$0.0015-$0.002 per Opus cold-start session
- CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS=1 with a 'Hello' priming call avoids cache-bust
- Worst-case resume can exceed 190K tokens before the user types a character
- The March 23 rate acceleration has three converging causes
Relations
- Git-Status Cache Bust --[depends_on]--> Prompt Cache Section Registry
- Three-Block Prompt Cache Layout --[enables]--> Git-Status Cache Bust
- CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS --[mitigates]--> Git-Status Cache Bust
- GitHub Issue #47098 (Git Cache-Bust) --[tracks]--> Git-Status Cache Bust
- March 23 Rate Acceleration --[caused_by]--> Git-Status Cache Bust