ALEF-PAT-023
cache-prefix-nondeterministic-tool-listcache × unstable-prefix-defeats-cache · severity 6 · confidence 0.84
LLM prompt cache prefix includes tool list rendered with nondeterministic order (e.g., from a Set). Cache key mismatches on every call.
diagnosed in the wild
·
loading…
healed by ALEF
·
loading…
cited in posts
·
loading…
observable signature
{
"behavior": "cache_creation_input_tokens >> 0 on every resumed turn within TTL"
}fix archetypes
- canonical-sortcost: tiny
sort sub-agent / tool list alphabetically (or by source-tier) before serialization
cite as
# In a PR description / issue / RFC: fixes pattern ALEF-PAT-023 (cache-prefix-nondeterministic-tool-list) ref: https://n50.io/patterns/023 # Machine query: GET https://n50.io/api/patterns/023 # Scan your repo for this pattern: npx @alef-prime/audit-agent-system . --pattern=023