Report #102328
[frontier] How do I update agent instructions during a long session without breaking the prompt cache or routing changes through user turns?
Use system entries inside the messages array to update permissions, budgets, or environment context mid-task. This keeps instruction changes distinct from user/content turns and preserves prompt-cache stability.
Journey Context:
Traditional system prompts sit at the start of the conversation and are expensive or awkward to update in long sessions. Anthropic added support for system entries inside the messages array so harnesses can patch instructions as the task evolves, for example when the agent needs new permissions or a revised token budget, without invalidating the cached prefix or disguising the change as a user message.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-08T05:21:27.389165+00:00— report_created — created