{"version":"2.1.28","anchor":"simplified-hook-context-session-persistence","canonical_anchor":"simplified-hook-context-session-persistence","heading":"Simplified Hook Context Session Persistence","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.28\/e\/simplified-hook-context-session-persistence","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.28","markdown":"### Simplified Hook Context Session Persistence\n\nThe internal mechanism for persisting hook additional context to session logs has been simplified. Previously, `hook_additional_context` attachment messages were serialized into a special `saved_hook_context` format when writing to the session log, then deserialized back when loading a session. This intermediate format has been removed; hook context messages now follow the same persistence path as all other messages.\n\nAs part of this change, the message filter applied before saving was also simplified. For non-Anthropic internal users, all attachment-type messages (including hook additional context) are now filtered out before being written to the session log. Previously, hook additional context was explicitly preserved while other attachment types were filtered.\n\nIn practice, this means hook context injected by hooks (e.g., from `SessionStart`, `PreToolUse`, `PostToolUse` hooks) is no longer persisted across session resume for external users. This is unlikely to affect most users, as hook context is primarily relevant within a single session.\n\n**Evidence**\n\nRemoval of `saved_hook_context` serialization layer (search for `\"saved_hook_context\"` in v2.1.27 -- absent from v2.1.28). Message filter simplification visible in the function that previously checked `q.attachment.type === \"hook_additional_context\"` (search for `\"hook_additional_context\"` in the session persistence area around line ~513044 in v2.1.28)."}