Quick Decision Rule: When Every agent turn shares a 12,000-token system prompt + tool schema, yet prompt caching hit rate is 0% and input bills stay high, choose Keep static instructions, tool schemas, and shared docs byte-identical at the start of the prompt; place dynamic timestamps/user IDs at the end.
| Trigger Condition | Every agent turn shares a 12,000-token system prompt + tool schema, yet prompt caching hit rate is 0% and input bills stay high |
|---|---|
| Recommended Choice | Keep static instructions, tool schemas, and shared docs byte-identical at the start of the prompt; place dynamic timestamps/user IDs at the end |
| Classic Trap | Putting `Current time: 2026-11-23T12:00:01Z` or a per-request UUID on line 1 of the system prompt invalidates the entire prefix cache on every single turn. |
| Verification | Audited on 2026-11-23 · Anthropic & OWASP Standard · 2026 |
30-SECOND DECISION TRAP CHECK · CONTEXT
You enabled Anthropic Prompt Caching on a 15,000-token system prompt + tool set, yet billing shows a 0% cache hit rate! Looking at line 1 of the system prompt: `Request ID: ${uuid()} | Time: ${new Date().toISOString()}`. What broke caching?
Prompt caches match exact token prefixes from byte 0. Any dynamic timestamp or request ID placed before static instructions invalidates the entire cached prefix.
Trap: Injecting timestamps or request IDs at the top of the system prompt silently kills 100% of prompt cache hits.