{"version":"2.1.227","anchor":"module-level-mutable-state-folded-into-resettable-holders","canonical_anchor":"module-level-mutable-state-folded-into-resettable-holders","heading":"Module-level mutable state folded into resettable holders","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-resettable-holders","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.227","markdown":"### Module-level mutable state folded into resettable holders\n\nMore scattered state became resettable holders, including per-instance locks instead of one global.\n\n**What**\n\nDozens of scattered module-level variables, maps and sets were moved into lazily created state objects reached through accessors, covering plugin state, agent and task state, git scrub paths, config caching, teammate mailboxes and terminal capability probes. Several holders gained a `reset()` method, and a process-wide promise-chain lock became a factory producing per-instance locks, so in-process state can now be torn down and rebuilt.\n\n**Details**\n\n- MCP errors are now dispatched into a store as `{ type: \"mcpError\", serverName, error }` rather than accumulated in a module array.\n- New named fields include `agentTranscriptSubdirs`, `bareGitRepoScrubPaths`, `installedPluginsFile`, `terminalRejects`, `childProcessTmpDirMemo` and `scriptCapsLatched`.\n- No user-visible behaviour change.\n\n**Evidence**\n\n`bareGitRepoScrubPaths`\n\n- Area: Session State\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 2\/5"}