{"version":"2.1.235","anchor":"module-level-singletons-converted-to-per-session-lazy-stores","canonical_anchor":"module-level-singletons-converted-to-per-session-lazy-stores","heading":"Module-level singletons converted to per-session lazy stores","tier":"internal","area":"Internals","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.235\/e\/module-level-singletons-converted-to-per-session-lazy-stores","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.235","markdown":"### Module-level singletons converted to per-session lazy stores\n\nMany module-global stores were converted to per-session lazy stores instead of shared process state\n\nA broad internal refactor replaces numerous module-level mutable globals with a WeakMap-backed lazy holder keyed on the session host, so state is scoped per session rather than shared across the whole process. Affected areas include background-daemon beacon state, the sync\/retry engine, background job frames, in-flight monitor state, the plan-file cache and plan slugs, the design tool's plan\/approval\/grant state, the background-rendezvous socket server, marketplace and checkout state, and OAuth callback tracking maps. Many free functions gained an explicit session\/state argument as a result of the change.\n\n- Area: Internals\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 0\/5"}