{"version":"2.1.269","anchor":"new-tryfinally-cleanup-around-pushing-user-and-compact-boun","canonical_anchor":"new-tryfinally-cleanup-around-pushing-user-and-compact-boun","heading":"New try\/finally cleanup around pushing user and compact-boundary messages","tier":"internal","area":"Compaction","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.269\/e\/new-tryfinally-cleanup-around-pushing-user-and-compact-boun","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.269","markdown":"### New try\/finally cleanup around pushing user and compact-boundary messages\n\nAppending user or compact-boundary messages mid-turn now always runs a cleanup step, even on error\n\n**What**\n\nWhen Claude Code adds a `user` message or a `compact_boundary` marker (used when a conversation is compacted, or shortened, to save space) to the ongoing conversation, that step is now wrapped so a cleanup function always runs afterward, even if something goes wrong partway through.\n\n**Why**\n\nThis guards against internal state being left inconsistent if an error occurs while recording one of these messages.\n\n- Area: Compaction\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5"}