Under the hood
A new marker tracks when the system prompt was re-rendered specifically because the model changed
What
Claude Code now records a marker in the conversation, tagged cause: 'set_model_system_prompt', when the system prompt is regenerated as a result of a model change. New logic uses the position of these markers in the conversation history to decide whether the system prompt needs to be re-rendered again after a model switch.
Why
This helps Claude Code avoid unnecessarily re-rendering the system prompt, by keeping track of exactly when it was last regenerated due to a model change.