fix: Prevent creation of new CLAUDE.md files if no activity is present. (#809)

This commit is contained in:
Max Millien
2026-01-25 23:57:55 -05:00
committed by GitHub
parent a8bb625513
commit 7c3bfadd5e
+12
View File
@@ -320,6 +320,18 @@ export async function updateFolderClaudeMdFiles(
}
const formatted = formatTimelineForClaudeMd(result.content[0].text);
// Fix for #758: Don't create new CLAUDE.md files if there's no activity
// But update existing ones to show "No recent activity" if they already exist
const claudeMdPath = path.join(folderPath, 'CLAUDE.md');
const hasNoActivity = formatted.includes('*No recent activity*');
const fileExists = existsSync(claudeMdPath);
if (hasNoActivity && !fileExists) {
logger.debug('FOLDER_INDEX', 'Skipping empty CLAUDE.md creation', { folderPath });
continue;
}
writeClaudeMdToFolder(folderPath, formatted);
logger.debug('FOLDER_INDEX', 'Updated CLAUDE.md', { folderPath });