Preserve prompt caching by propagating static instruction changes as incremental messages
Detect changes to session-scoped instructions such as AGENTS.md, skills, and rules.
Keep the original system/developer instruction prefix unchanged to preserve provider prompt-cache hits.
Represent updates and removals as explicit incremental user (developer) messages that supersede previous versions.
Ensure subsequent turns use the latest instruction state without rebuilding the existing conversation context.
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
A possible approach when system/developer in-chat instructions can't be used: plan_mode_in_qwen_harness.md
I believe we can achieve that simply supporting develoepr messages when the API supports that (anthropic, openai-responses, bedrock?), we would just need to make sure we don't change system prompt for when this happen + include a new UI in each client to represent the developer message, a different color maybe or similar to system messages color.