Skip to content

Preserve prompt caching by propagating static instruction changes as incremental messages #527

Open

Description

@zikajk

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.

Activity

  1. zikajk commented on Jul 20, 2026

    @zikajk
    MemberAuthor

    A possible approach when system/developer in-chat instructions can't be used:
    plan_mode_in_qwen_harness.md

  2. ericdallo commented on Jul 20, 2026

    @ericdallo
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions