Change instructions mid-conversation and keep your cache

Send system messages after a user turn, so instructions can change in a long session without losing cache hits.

Dipartimento
Engineering
Link correlati
Condividi

Instructions sometimes change partway through a long session. You can send a role: "system" message inside the messages array, after a user turn, and keep your prompt cache hits, so an agent gets new instructions without paying to reprocess the conversation.

Placement rules apply. It's on Claude Opus 4.8, on the Claude API, Claude in Amazon Bedrock, and Google Cloud.

Aggiornamenti precedenti

28 mag 2026
27 mag 2026
21 mag 2026
19 mag 2026
Tutti gli aggiornamenti