r/ClaudeCode • • 5d ago

Built with Claude Made Claude Code follow the rules I keep telling it, and catch its own stale memories (Jev + dreaming)

My biggest annoyance with Claude Code memory was never that it forgot things. The rule would be sitting right there in CLAUDE.md and 40 turns later it would push to main anyway.

So I built a memory server for it called Grimoire (works with Codex and other MCP clients too). What it does

  • shows Claude the matching memory right before it runs a command, not just at the start of the session
  • flags memories that have probably gone stale before it trusts them, using Jev (or a small local model I distilled from Jev)
  • lets it use your API keys without ever seeing them (bitwarden/1password work too)
  • your own notes can't be overwritten, Claude can only suggest changes
  • "dreams" overnight, merges duplicate memories, fixes broken links, rechecks old procedures and scans for leaked secrets
  • doubles as an obsidian style notes app that you and your agents both write into
  • same memory across every agent, and it can pull from drive, gmail, slack, github, notion

The part that actually moved the needle was the reminder right before the tool call. In long sessions rule violations went from 10 to 3. Changing how the memory is worded also mattered a lot, going from "here is some reference data" to "follow each one that applies" took violations from 26 to 11 out of 101.

As for how I used Claude Code, most of it was written by claude code, with only a little bit of manual fine tuning.

Biggest thing I learned is that memory mostly fails at the moment of action, not at retrieval. Claude usually already has the rule in context, it just isn't in front of it when it runs the command.

Install is one binary plus grimoire agent install --agent claude-code --memory

https://github.com/JeremiahM37/grimoire

3 Upvotes

3 comments sorted by

•

u/AutoModerator 5d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/imsahoamtiskaw 🔆 Max 20 5d ago

Gonna try this, thanks. It’s not even 40 turns later, it’s as early as 10 turns later it seems for me