-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed as not planned
Closed as not planned
Copy link
Description
📝 Manual Bug Report
Bug Description
CLAUDE.md files are being created inside the .git/ directory structure, which causes git pull to fail with the error:
fatal: bad object refs/CLAUDE.md
error: github.com:xxx/xxx.git did not send all necessary objects
The following files were found inside .git/:
.git/refs/CLAUDE.md.git/refs/tags/CLAUDE.md.git/refs/remotes/origin/CLAUDE.md.git/logs/CLAUDE.md.git/CLAUDE.md
Git interprets these as invalid references, breaking git operations.
Steps to Reproduce
- Use Claude Code with claude-mem plugin in a git repository
- Work normally with various tool calls (Read, Edit, Bash, etc.)
- Attempt
git pull - Observe the error:
fatal: bad object refs/CLAUDE.md
Expected Behavior
The .git/ directory should be completely excluded from CLAUDE.md auto-generation. According to the documentation, "The project root (folders containing a .git directory) is excluded from auto-generation" - but the .git/ directory itself should also be excluded.
Environment
- Claude-mem version: 9.0.1
- Claude Code version: 2.1.9
- OS: macOS 26.1 (Tahoe)
- Platform: Apple Silicon (arm64)
Workaround
Manually removing the files resolves the issue:
find .git -name "CLAUDE.md" -deleteSetting CLAUDE_MEM_FOLDER_CLAUDEMD_ENABLED to "false" in ~/.claude-mem/settings.json may prevent future occurrences.
Additional Context
- The
.gitignorealready containsCLAUDE.md, but that doesn't prevent files from being created inside.git/ - This appears to be a path filtering issue where
.git/subdirectories are not being excluded - Multiple CLAUDE.md files (158+) were also created throughout the project in various subdirectories
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels