{"version":"2.1.198","anchor":"memory-stores-env-var","canonical_anchor":"memory-stores-env-var","heading":"Memory Stores Env Var","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.198\/e\/memory-stores-env-var","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.198","markdown":"### Memory Stores Env Var\n\n**What**\n\nA new `CLAUDE_MEMORY_STORES` environment variable activates expanded memory storage, alongside the `tengu_moth_copse` feature flag.\n\n**Usage**\n\n`export CLAUDE_MEMORY_STORES=\"...\"` **Details** - Feature-flagged via `tengu_moth_copse`; setting that flag OR providing a non-empty `CLAUDE_MEMORY_STORES` value enables the multi-store subsystem (`qat()` returns true in either case) - The env var accepts a **JSON array**; each element is either a bare path string or an object with fields: `path` (absolute, required), `mode` (`\"rw\"` | `\"ro\"`, default `\"rw\"`), `scope` (`\"user\"` | `\"team\"`, default `\"team\"`), `mount` (optional alphanumeric name auto-derived from the last path segment if omitted), `promptIndex` (optional relative path), `promptIndexMaxBytes` (optional integer) - Validation is strict: the JSON must parse cleanly, all paths must be absolute and must not override the host, mount names must match `\/^[A-Za-z0-9_-]+$\/`, duplicate mount names throw, and only one `scope:\"user\"` entry is permitted - At startup, successfully parsed stores are logged at debug level: `\"memory-stores: parsed N store(s): mount(mode), ...\"` - When active, the multi-store router (`uL()`) supersedes the default single-directory memory path, routing reads and writes to the configured stores based on scope **Evidence** `qat()` function (search for `\"CLAUDE_MEMORY_STORES\"` and `tengu_moth_copse` flag); `eue()` parser and `zqd` schema (search for `\"CLAUDE_MEMORY_STORES is not valid JSON\"` and `\"CLAUDE_MEMORY_STORES has duplicate mount\"`)\n\n- Flag `tengu_moth_copse`: Off in both readings (read for one account on one subscription tier against v2.1.198; this account: off, anonymous baseline: off, compiled default: off) These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release."}