{"version":"2.1.227","anchor":"module-level-mutable-state-folded-into-owning-objects","canonical_anchor":"module-level-mutable-state-folded-into-owning-objects","heading":"Module-level mutable state folded into owning objects","tier":"internal","area":"Session State","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.227\/e\/module-level-mutable-state-folded-into-owning-objects","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.227","markdown":"### Module-level mutable state folded into owning objects\n\nDozens of long-lived caches moved onto objects so a session can be reset inside one process.\n\n**What**\n\nAcross dozens of subsystems, loose file-scope variables were moved onto single state objects or small classes, covering terminal capability detection, plugin and marketplace caches, skills loading, git directory lookups, org policy status, the teammate mailbox, agent observer pairings, computer-use state, voice recording, the global config cache and child-process tracking. Behaviour is meant to be identical; the point is that this state can now be reset per run rather than living for the life of the process.\n\n**Details**\n\n- Some memoised dynamic imports were deliberately de-memoised back to a plain promise each time.\n- Terminal backends such as tmux and iTerm are now cached singletons instead of being rebuilt on every call, and settings-file parse caches are held per store rather than process-wide.\n\n**Evidence**\n\n`VoiceRecorderState.reset() called while a recording is live; call stopRecording() first`, `AA.shouldAutoEnable`, `synchronizedOutputSupported`\n\n- Area: Session State\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 3\/5"}