惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
博客园 - 【当耐特】
M
MIT News - Artificial intelligence
D
Docker
博客园 - 三生石上(FineUI控件)
博客园 - 司徒正美
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
月光博客
月光博客
S
SegmentFault 最新的问题
Jina AI
Jina AI
Blog — PlanetScale
Blog — PlanetScale
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - Franky
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
CLAUDE.md is not enough: why I built a local-first memory...
Luís Monteir · 2026-04-27 · via DEV Community

Luís Monteiro

I use Claude Code a lot.

One thing kept annoying me: not the mistakes, not the occasional wrong assumption, not even the weird confidence.

The annoying part was having to re-explain the same project context in new sessions.

Things like:

  • this module looks legacy but still supports a critical flow
  • this query already caused performance issues
  • this test failed before because the hook returned formatted text, not an array
  • this architecture decision looks strange, but it exists for a reason
  • this project separates bugs from improvements in release notes
  • do not touch this config unless you understand the install flow

Some of that belongs in CLAUDE.md.

But not all of it.

The problem with putting everything in CLAUDE.md

CLAUDE.md is great for stable project instructions:

  • how to run the project
  • how to run tests
  • coding conventions
  • architecture guidelines
  • commands the agent should know
  • repo-specific workflows

That kind of context is stable and broadly useful.

The problem starts when CLAUDE.md becomes the place for every pitfall, debugging note, warning, workaround, decision, and preference.

At that point, it stops being onboarding context and becomes a giant context dump.

That creates two problems.

First, every new session pays for it in tokens, even when the current task only needs one small detail.

Second, the more context you throw in, the easier it is for the important bit to get ignored.

More context is not always better context.

Sometimes it is just a bigger haystack with the same needle inside it.

The split that made more sense to me

I started thinking about project context as two different things:

CLAUDE.md = stable onboarding instructions
working memory = retrieved project-specific notes

Enter fullscreen mode Exit fullscreen mode

CLAUDE.md should explain how the project works.

Working memory should remember what happened while working on the project.

That includes things like:

  • decisions
  • facts
  • patterns
  • pitfalls
  • architecture notes
  • project preferences
  • session summaries

The key difference is that working memory should not be dumped into every prompt.

It should be searched, ranked, and injected only when relevant.

So I built Memento MCP

Memento MCP is a local-first MCP server that gives Claude Code and other stdio-MCP clients persistent project memory.

The basic idea is simple:

  1. Store useful project knowledge as typed memories.
  2. Search and rank memories for the current task.
  3. Inject only the relevant memory into the agent.
  4. Avoid turning every new session into a giant repeated context paste.

Default setup:

  • local SQLite
  • FTS5 search
  • no mandatory cloud account
  • no hosted vector DB

It also supports:

  • optional embeddings
  • team memory sync through git
  • Obsidian vault indexing
  • privacy controls
  • local web inspector

Example

Instead of adding this to CLAUDE.md forever:

The scheduling module looks legacy but still supports a critical production flow.
Do not rewrite it casually.
The pagination query caused performance issues before.
The release notes must separate bugs from improvements.

Enter fullscreen mode Exit fullscreen mode

Those notes can live as typed memories.

Then, when the agent is working on the scheduling module or release notes, the relevant memory is retrieved.

When the agent is working on something unrelated, that context stays out of the prompt.

That is the part I care about most: reducing repeated context without losing important project knowledge.

GitHub:

https://github.com/lfrmonteiro99/memento-mcp

Docs:

https://lfrmonteiro99.github.io/memento-mcp

What I want feedback on

I am mainly trying to validate the workflow.

The questions I care about:

  1. Does the CLAUDE.md vs working memory split make sense?
  2. Would you trust an MCP server to inject memory into Claude Code?
  3. What kind of project memory would you actually want an agent to remember?
  4. What would make this annoying, unsafe, or too noisy?
  5. Should memory be mostly explicit/manual, or should the agent be allowed to suggest memories automatically?

I built this because I got tired of re-explaining the same project context over and over again.

Not because agents need more magic.

They mostly need better memory, fewer repeated instructions, and less context shoved into every prompt like we are packing for the apocalypse.