Tech Update / Adventures with Claude Code #9
saving tokens with memory
I'm always surprised how often I read that someone hit the limit on their $20 plan after a short while. "Done after an hour", "Pro just isn't enough". In my experience, it's usually not the plan. It's what the tokens are being spent on.
One big line item: forgetfulness.
Every session starts from zero. Claude reads the same files again, explores the project structure again, and you explain for the third time why test X is flaky. That costs tokens every single time without producing anything new.
The fix: give Claude a memory. Two ways to do it:
🧠 Claude Code's built-in auto memory
Claude keeps its own notes about your project: patterns it discovered, debugging insights, your corrections. They're stored locally under ~/.claude/projects/<project>/memory/. At the start of each session, Claude loads only the compact MEMORY.md index and pulls in the detailed notes when needed.
It's on by default. Run /memory to see what Claude has noted, edit it, or switch it off.
🗂️ Claude-Mem (community plugin)
Goes a step further: the plugin automatically records what Claude does during a session, condenses it into summaries and stores everything locally in a searchable database. In your next session, just ask: "How did we solve authentication last week?"
The trick is called progressive disclosure: Claude first sees a compact overview and only fetches details for the entries that actually matter. According to the project, that cuts token usage for search by roughly 10x.
Install it right inside Claude Code:
/plugin marketplace add thedotmack/claude-mem
/plugin install claude-mem
A word of caution:
Memory isn't free. Whatever loads at startup takes up context, so the same rule applies as with CLAUDE.md: short beats complete. Claude-Mem also generates its summaries with a model in the background, which uses tokens too. And it's a community project, not an Anthropic one. Just like with MCP servers: only install extensions from sources you trust.
Three quick savings tips on top:
/clearwhen you switch to a new task. Otherwise the old history gets processed with every message./contextshows what's filling up your context window./usageshows where you stand on your limits. Measure, don't guess.
My rule of thumb:
- Rules for the whole team?
CLAUDE.md(part 4). - What Claude learns on the job? Auto memory.
- Searching past sessions? Claude-Mem.
Deutsch
English