Add claude-memory-tidy to Memory & Context Management - #147
Open
tonydzi wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds one resource to Memory & Context Management.
What it is
claude-memory-tidy — a small deterministic toolkit that keeps Claude Code's always-loaded
MEMORY.mdindex healthy on macOS/Linux.The problem it addresses
MEMORY.mdis loaded into every session, and past a fixed size the harness truncates it with no error. The tail silently disappears and the agent stops knowing things it "remembers". Separately, notes accumulate on disk that nothing points at — present but unreachable, which at recall time is the same as deleted.What it does
description:— transcription, not invention, and it costs zero live-index budget.hub-*.mdsub-index verbatim, and refuses to write at all if any folded note would lose reachability. This guards against summary-grounding, where a model rewrites a hook "while it's in there" and the disambiguating detail evaporates.Measured on one real run: 26 275 B / 164 lines / 112 orphans → 8 606 B / 52 lines / 0 orphans. Nothing deleted.
Checklist
SKILL.mdMIT, Python stdlib only, no network calls, no telemetry. 17 tests run against a temporary fixture (
python3 tests/test_memory_tidy.py), so they pass on any machine and never touch real memory.