Keep the agent scratchpad from breaking the cache
Separate stable agent definitions from volatile tool results and scratchpad content to preserve cache benefits.
The growing transcript Your agent prompt grows after every tool call. Stable instructions are buried behind volatile observations. Every new observation can shift the prefix and erase the benefit of the stable agent definition. Agent cache rule Contract before state The agent contract changes by release; observed state changes by turn. Cache design should respect that difference. Full context easy to send, hard to reuse consistently Stable capability definitions can be reused while live state remains current. In agents, cache the durable contract and append the changing state. 01 Contract 02 Tools 03 State Node 1 The prompt starts with…
Sign up free — one personalized lesson every day, matched to your role and goals.
Already have an account? Sign in