You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make the system prompt cache-friendly for cloud models #93
Anthropic prompt caching is on for the system prompt and tool list, but the system prompt includes the current time, so it changes every minute and the cache rarely hits.
What to do: move the clock (and anything else that changes per turn) out of the cached system block, for example into a short note in the latest user message, keeping what the model sees equivalent.
I’d like to work on this. I’ll move the dynamic current time context out of the cached system prompt into the latest user message, then add regression tests to verify the system prompt remains stable while the model still receives the current time. Could you assign this issue to me?
Assigned to you, thanks @riddhigupta1110! That plan sounds right: keep the system prompt byte-stable so prompt caching works, and put the current time on the latest user message. Please run the full suite before opening the PR and link this issue in it.
Thank you @riddhigupta1110, it was a pleasure working with you! You're right about the name: that's our mistake, not yours. Our own tests used the real name, so copying it was natural. I've opened #285 to switch them all to the fictional Maya Rao. It's yours if you'd like it after your exam.
Activity
riddhigupta1110 commentedon Oct 8, 2026
I’d like to work on this. I’ll move the dynamic current time context out of the cached system prompt into the latest user message, then add regression tests to verify the system prompt remains stable while the model still receives the current time. Could you assign this issue to me?
itsskofficial commentedon Oct 8, 2026
Assigned to you, thanks @riddhigupta1110! That plan sounds right: keep the system prompt byte-stable so prompt caching works, and put the current time on the latest user message. Please run the full suite before opening the PR and link this issue in it.
riddhigupta1110 commentedon Oct 11, 2026
You were very helpful and welcoming! Thank you for all your help and suggestions. Absolutely enjoyed working on this.
Also, there are test cases which use the user name as "Sarthak", that was the reason why I had used that name in my test.
itsskofficial commentedon Oct 11, 2026
Thank you @riddhigupta1110, it was a pleasure working with you! You're right about the name: that's our mistake, not yours. Our own tests used the real name, so copying it was natural. I've opened #285 to switch them all to the fictional Maya Rao. It's yours if you'd like it after your exam.