MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / isAutoMemoryEnabled

Function isAutoMemoryEnabled

source code/memdir/paths.ts:32–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30 * 5. Default: enabled
31 */
32export function isAutoMemoryEnabled(): boolean {
33 const envVal = process.env.CLAUDE_CODE_DISABLE_AUTO_MEMORY
34 if (isEnvTruthy(envVal)) {
35 return false
36 }
37 if (isEnvDefinedFalsy(envVal)) {
38 return true
39 }
40 // --bare / SIMPLE: prompts.ts already drops the memory section from the
41 // system prompt via its SIMPLE early-return; this gate stops the other half
42 // (extractMemories turn-end fork, autoDream, /remember, /dream, team sync).
43 if (isEnvTruthy(process.env.CLAUDE_CODE_SIMPLE)) {
44 return false
45 }
46 if (
47 isEnvTruthy(process.env.CLAUDE_CODE_REMOTE) &&
48 !process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR
49 ) {
50 return false
51 }
52 const settings = getInitialSettings()
53 if (settings.autoMemoryEnabled !== undefined) {
54 return settings.autoMemoryEnabled
55 }
56 return true
57}
58
59/**
60 * Whether the extract-memories background agent will run this session.

Callers 15

loadAgentsDir.tsFile · 0.85
parseAgentFromJsonFunction · 0.85
parseAgentFromMarkdownFunction · 0.85
MemoryFileSelectorFunction · 0.85
useMemorySurveyFunction · 0.85
generateAgentFunction · 0.85
CreateAgentWizardFunction · 0.85
ConfirmStepFunction · 0.85
MemoryStepFunction · 0.85
claudemd.tsFile · 0.85
isAutoMemFileFunction · 0.85

Calls 3

isEnvTruthyFunction · 0.85
isEnvDefinedFalsyFunction · 0.85
getInitialSettingsFunction · 0.85

Tested by

no test coverage detected