{"version":"2.1.227","anchor":"remote-sessions-can-adopt-the-host-s-auto-compact-settings","canonical_anchor":"remote-sessions-can-adopt-the-host-s-auto-compact-settings","heading":"Remote sessions can adopt the host's auto-compact settings","tier":"notice","area":"Compaction","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.227\/e\/remote-sessions-can-adopt-the-host-s-auto-compact-settings","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.227","markdown":"### Remote sessions can adopt the host's auto-compact settings\n\nRemote sessions now use the host's auto-compact settings for context and token display.\n\n**What**\n\nA session running over the SDK or bridge can now be told the host's auto-compact configuration (whether it is on, the effective context window, the threshold, and whether it is enforced) and will use it for its own token-usage and context display, instead of guessing from local settings. A seed value can also arrive at session start.\n\n**Details**\n\n- Carried as a new control frame type `autocompact_state`, stored in app state as `remoteAutocompactState`.\n- Successful adoption is reported as `tengu_remote_autocompact_state_adopted`, including `enabled`, `enforced`, `source` and `via`.\n- Frames that do not parse are dropped once, with the log line \"[sdkMessageAdapter] Dropping malformed autocompact_state frame\" and an `invalid_frame` error report.\n- The session state object gained `onAutocompactInputsChanged` and `onConversationReset` callbacks, which fire when the compaction window, model or settings change.\n\n**Evidence**\n\n`tengu_remote_autocompact_state_adopted`, `[sdkMessageAdapter] Dropping malformed autocompact_state frame`\n\n- Area: Compaction\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 3\/5"}