Three-Block Prompt Cache Layout
- Entity ID:
ent-20260423-r31a000000022 - Type:
pattern - Scope:
private - Status:
active
Description
Claude Code's prompt cache is structured in three blocks: Block 1 {tools | claude-version}; Block 2 {system-prompt | ~/.claude/claude.md | git-status}; Block 3 {skills | ./claude.md | user-prompt}. Invalidation cascades — breaking block N invalidates all higher-numbered blocks. This layout is what makes git-status-in-block-2 so destructive: one transient value destroys two-thirds of the cache.
Key claims
- Every git commit busts Claude Code's prompt cache
- CachePointBlock position determines the prompt cache prefix
Relations
- Three-Block Prompt Cache Layout --[enables]--> Git-Status Cache Bust
- CachePointBlock --[governs]--> Three-Block Prompt Cache Layout