Zendoric
← Back to the day · June 26, 2026

Pruning Claude Code's memory with a human in the loop: the tool that doesn't trust the model

🕒 Published on Zendoric: June 26, 2026 · 09:00

A 'Show HN' proposes a skill for Claude Code that cleans up the memory file by showing each change as a diff for the user to approve. Its premise is as modest as it is sound: if you don't trust the model not to bloat the memory, don't trust it to prune it either.

Amid the major announcements about military AI and mental health, it is worth pausing on a small and very revealing contribution. A user published on Hacker News a 'skill' for Claude Code that tackles an everyday problem for those who use AI assistants intensively: the memory file that keeps context across sessions fills up with redundant information, anecdotes and noise until, according to the author, it stops helping and even harms performance. The trigger was specific: he noticed the assistant was no longer remembering things he had explicitly asked it to remember, and when he opened the file he found it saturated with useless material.

What is interesting is not the tool itself, but its design philosophy. Instead of letting the model decide on its own what to delete, it works like an interactive interview: it presents each proposed change as a diff and asks for the user's approval before applying it. The author's argument is elegant in its consistency: if you don't trust the model not to bloat the memory in the first place, it makes no sense to trust it to prune without supervision. It is the 'human in the loop' principle applied to the maintenance of the system itself.

The problem it addresses —the 'context bloat' of files like CLAUDE.md— is a real and growing friction. Instruction files accumulate preferences, corrections and project context without a native mechanism for granular cleanup, and every wasted token competes with useful context. The author notes that he has tested it mainly on Claude Code, although he expects compatibility with analogous environments such as Codex, OpenCode or Composer, where the memory mechanism is similar.

It is worth keeping expectations in perspective: at the time of capture the post had 1 point and no comments, with no link to the repository in the available metadata. In other words, an early idea with still limited reach, not a consolidated project. But its value is conceptual rather than viral. Against the temptation to automate everything, this skill is a reminder that context hygiene is a discipline, and that the best agentic AI is not the one that decides the most, but the one that knows when to ask for permission. In ecosystems where persistent memory determines the quality of the work, tools this humble may end up being more useful than many flashy launches.

Sources & references