Changing output style mid-session without breaking the cache

CCDV-F Prompt & Context Engineering Hard Question 10 of 105

A support console on Claude Opus 5 caches a large system prompt. Midway through a session, the developer needs the model to switch to concise output, and the instruction must take precedence over later user requests. Editing the top-level system parameter would invalidate the cached prefix.

Which approach best fits the requirement?

Show answer and explanation

BAppend a system-role message right after the latest user message in messages.

Appending a system-role message directly after the latest user turn applies the directive with authoritative system precedence while preserving the existing prompt cache prefix. Appending a user-role message fails to guarantee persistent compliance because user instructions are treated as conversational input and can be superseded by subsequent user turns. Updating the top-level system prompt parameter alters the beginning of the hashed prompt prefix, causing a cache miss that forces the integration to re-tokenize the entire prompt history. Initializing a brand new session with a summarized context discards the cached prefix entirely and drops granular conversational state, increasing latency and operational overhead.

Source: platform.claude.com/docs/en/build-with-claude/mid-conversat…

Anonymous, no account needed. Your tally stays in this browser.

Next question Start 5 timed questions Browse all 105 original CCDV-F practice questions