Skip to content

Bug: CLAUDE_MEM_FOLDER_CLAUDEMD_ENABLED setting is not checked - folder CLAUDE.md files always generated #760

@mkdelta221

Description

@mkdelta221

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_ENABLED is 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

Version

v9.0.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions