{"version":"2.1.229","anchor":"per-session-state-replaces-one-process-wide-globals-object","canonical_anchor":"per-session-state-replaces-one-process-wide-globals-object","heading":"Per-session state replaces one process-wide globals object","tier":"internal","area":"Session State","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.229\/e\/per-session-state-replaces-one-process-wide-globals-object","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.229","markdown":"### Per-session state replaces one process-wide globals object\n\nProcess-wide state moved into per-session objects, groundwork for isolating multiple sessions in one process.\n\n**What**\n\nSession and process state that used to live in a single mutable object read and written directly from anywhere is now held in per-domain classes with private fields and named accessors, so state can be isolated per session instead of being shared across the process. Nothing changes for you.\n\n**Details**\n\n- Fields such as sticky betas, the current prompt id, capabilities, vim state and the last API request now go through methods like `stickyBetas()`, `unlatchStickyBetas()`, `replacePromptCache1hAllowlist`, `primeSessionMessagesCache`, `notePlanFileWritten` and `recordThinkingTypeOverride`, many created lazily.\n- The session record gained a `host` sub-object alongside its existing project paths.\n- Dozens of functions now take a session argument rather than reaching for the global.\n\n**Evidence**\n\n`unlatchStickyBetas`\n\n- Area: Session State\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 3\/5"}