Feature request: Let users disable prompt caching for prompt hooks, especially Stop hooks
Resolved 💬 1 comment Opened Apr 15, 2026 by PyGeek03 Closed May 25, 2026
Feature Request
Problem
Prompt hooks (PreToolUse, PostToolUse, Stop) execute with unpredictable timing gaps. For hooks like Stop hooks, the interval between invocations can easily exceed the 5-minute prompt cache write TTL. This means:
- The prompt gets cached on first hook invocation (paying the cache write cost)
- By next invocation, the cache has expired
- The prompt gets re-cached again (paying the write cost again)
- Repeat — effectively paying cache write overhead every time with zero cache read benefit
Proposed Solution
Add a configuration option (per-hook or global) to disable prompt caching for prompt hooks. For example, in hook configuration:
{
"hooks": {
"Stop": [
{
"type": "prompt",
"prompt": "Review the changes made...",
"cache": false
}
]
}
}
Why This Matters
- Cost: Cache writes cost 25% more than base input tokens. If the cache never gets a read hit, users pay more than without caching.
- Latency: No benefit from caching if the cache always expires between invocations.
- User control: Users know their hook invocation patterns better than the system — let them opt out when caching is counterproductive.
Additional Context
This is most relevant for:
- Stop hooks (fire only when the agent stops, which can be minutes apart). Unused cache writes are especially expensive for Stop hooks that verify the whole session (e.g. check that outcome has been achieved, check that the whole plan has been executed correctly).
- Any hook with prompts that are invoked infrequently relative to the 5-minute cache TTL
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗