-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Description
The setting CLAUDE_MEM_FOLDER_CLAUDEMD_ENABLED is documented in the configuration docs as defaulting to false, but the code never actually checks this setting. Folder CLAUDE.md files are always generated regardless of the setting value.
Expected Behavior
When CLAUDE_MEM_FOLDER_CLAUDEMD_ENABLED is false (or not set), no CLAUDE.md files should be auto-generated in subdirectories.
Actual Behavior
CLAUDE.md files are created in every subdirectory where files are read or modified, even when the setting is false or absent from settings.json.
Evidence
From docs/reports/issue-600-documentation-audit-features-not-implemented.md:
The setting
CLAUDE_MEM_FOLDER_CLAUDEMD_ENABLEDis never read. The feature runs unconditionally when files are touched.
Location of Bug
The updateFolderClaudeMdFiles function in src/utils/claude-md-utils.ts is called without checking the CLAUDE_MEM_FOLDER_CLAUDEMD_ENABLED setting first.
Suggested Fix
Add a check at the start of updateFolderClaudeMdFiles() or at the call site to read the setting and return early if disabled:
const settings = SettingsDefaultsManager.loadFromFile(SETTINGS_PATH);
const enabled = settings.CLAUDE_MEM_FOLDER_CLAUDEMD_ENABLED === 'true';
if (!enabled) return;Also ensure CLAUDE_MEM_FOLDER_CLAUDEMD_ENABLED is added to SettingsDefaultsManager.ts with a default of 'false'.
Related Issues
- Claude-mem creates empty CLAUDE.md files in all folders #758 - Claude-mem creates empty CLAUDE.md files in all folders
- Bug: CLAUDE.md files created inside .git directory causing git pull failures #734 - CLAUDE.md files created inside .git directory
Version
v9.0.5