{"version":"2.1.227","anchor":"scattered-globals-replaced-with-resettable-state-records","canonical_anchor":"scattered-globals-replaced-with-resettable-state-records","heading":"Scattered globals replaced with resettable state records","tier":"internal","area":"Session State","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.227\/e\/scattered-globals-replaced-with-resettable-state-records","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.227","markdown":"### Scattered globals replaced with resettable state records\n\nGlobals became resettable objects, making it possible to restart a session inside a running process.\n\n**What**\n\nA large mechanical refactor turned dozens of module-level variables into fields on lazily created singleton objects reached through accessors, some with an explicit `reset()`. Nothing changes for you, but it makes tearing down and restarting a session inside a running process possible.\n\n**Details**\n\n- Covers the command fuzzy-search index, shell history, sandbox session flags, artifact and workshop state, plugin and marketplace caches, MCP tool-refresh sequences, terminal layout caching (a per-node cached layout instead of a WeakMap) and several event emitters.\n- The sandbox reset is async and calls the settings-subscription cleanup.\n\n**Evidence**\n\n`sandboxDisabledThisSession`\n\n- Area: Session State\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 3\/5"}