{"version":"2.1.281","anchor":"session-message-cache-can-be-kept-across-clears","canonical_anchor":"session-message-cache-can-be-kept-across-clears","heading":"Session message cache can be kept across clears","tier":null,"area":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281\/e\/session-message-cache-can-be-kept-across-clears","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281","markdown":"### Session message cache can be kept across clears\n\nA new internal switch can keep a session's stored message list from being cleared\n\n**Unclear.** The finding does not say what turns this switch on.\n\n**What**\n\nClaude Code keeps an in-memory copy of a session's messages, called a cache. A new switch, `keepSessionMessagesCache`, is off by default and is set through `setKeepSessionMessagesCache`. While it is on, `clearSessionMessagesCache` does nothing, so the stored messages are kept.\n\n**Why**\n\nThis is internal behavior with no visible change by default. It lets some part of Claude Code keep a session's messages that would otherwise be cleared."}