Summary
Add an optional ignoreGlobs key to .claude/auto-memory/config.json so users can exclude data/content paths from being tracked in dirty-files. Files matching any glob are treated like the existing .claude/ and memory-file exclusions in should_track() — they never arm the blocking Stop/PreToolUse hook.
Motivation
On research/data repositories, a large share of changes are value changes to data files (JSON datasets, status files, references, logs) rather than structural changes to code or docs. Today should_track() only excludes .claude/ and the configured memory files, so:
- In
gitmode, every git commit touching such data files appends them to dirty-files, and the Stop hook blocks until memory-updater runs.
memory-updater is the only thing that clears dirty-files. Skipping it ("this change does not affect CLAUDE.md") leaves the entries, so the block re-fires every turn and the file list accumulates across commits.
The result is a repeated, heavyweight agent prompt for changes that can never affect the memory file. There is currently no config-level way to scope this out.
Proposal
.claude/auto-memory/config.json:
{
"triggerMode": "gitmode",
"ignoreGlobs": ["data/**", "**/status.json", "logs/**"]
}
- Patterns match the project-relative POSIX path via
fnmatch.
- A string is accepted and treated as a single-element list (mirrors
memoryFiles).
- Absent/empty → no change in behavior (fully backward compatible).
- Applied in both code paths that feed
should_track() (Edit/Write and git-commit).
Scope
scripts/post-tool-use.py: add get_ignore_globs(), extend should_track() with an ignore_globs parameter, wire it in main().
tests/test_hooks.py: unit + integration coverage.
README.md: document the key under Configuration.
I have a working implementation and tests and am happy to open a PR.
Summary
Add an optional
ignoreGlobskey to.claude/auto-memory/config.jsonso users can exclude data/content paths from being tracked indirty-files. Files matching any glob are treated like the existing.claude/and memory-file exclusions inshould_track()— they never arm the blocking Stop/PreToolUse hook.Motivation
On research/data repositories, a large share of changes are value changes to data files (JSON datasets, status files, references, logs) rather than structural changes to code or docs. Today
should_track()only excludes.claude/and the configured memory files, so:gitmode, everygit committouching such data files appends them todirty-files, and the Stop hook blocks untilmemory-updaterruns.memory-updateris the only thing that clearsdirty-files. Skipping it ("this change does not affect CLAUDE.md") leaves the entries, so the block re-fires every turn and the file list accumulates across commits.The result is a repeated, heavyweight agent prompt for changes that can never affect the memory file. There is currently no config-level way to scope this out.
Proposal
.claude/auto-memory/config.json:{ "triggerMode": "gitmode", "ignoreGlobs": ["data/**", "**/status.json", "logs/**"] }fnmatch.memoryFiles).should_track()(Edit/Write and git-commit).Scope
scripts/post-tool-use.py: addget_ignore_globs(), extendshould_track()with anignore_globsparameter, wire it inmain().tests/test_hooks.py: unit + integration coverage.README.md: document the key under Configuration.I have a working implementation and tests and am happy to open a PR.