{
  "id": 6875953,
  "title": "I stopped asking my AI agents to read the project memory. Now the server does it for them.",
  "url": "https://urgent.news/2026/09/12/i-stopped-asking-my-ai-agents-to-read-the-project-memory-now-the",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-12T06:21:17.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/nicolas_micaud_20671fb4f2/i-stopped-asking-my-ai-agents-to-read-the-project-memory-now-the-server-does-it-for-them-238n"
  },
  "original_language": "en",
  "account": "This story details how the author shifted their approach to providing project context to Claude Code sessions. Initially, they attempted to explicitly instruct each session to first search the project memory before making any decisions. However, they found that this instruction was not reliably followed, as the sessions would often proceed without consulting the memory, leading to defects going unnoticed until later stages.\n\nThe author then decided to move the memory retrieval step from the prompt into the underlying system, where it could be reliably executed before the model even received its first turn. They implemented a server-side step that performs semantic search on the project memory and injects the relevant information directly into the session's first message. This memory context is now part of the model's initial context, rather than something the model has to actively retrieve.\n\nThe author also preserved a fallback mechanism, where if the memory retrieval fails or is not available, the session will revert to a standard prompt that encourages the model to search the memory. This approach ensures that the model always has access to the necessary context, even if it has to rely on the memory retrieval to provide it.\n\nThe implementation details include using markdown notes with YAML frontmatter for storing project context, with each note having a description that serves as the embedding text. The server runs the memory search deterministically and injects the relevant notes directly into the session's first message. This approach provides deterministic context for the model, while still allowing for graceful degradation if memory retrieval fails.\n\nThe author emphasizes the importance of moving memory-related tasks to the plumbing layer of the system, rather than relying on the model's prompt. This ensures guarantees and reliability, rather than hoping the model will remember or follow instructions reliably. The implementation is simple, using built-in capabilities and local embeddings, avoiding external services and complex vector databases. The result is a more reliable system where the model always has the necessary context to make informed decisions.",
  "summary": "Follow-up to I run 9 parallel Claude Code sessions — the bottleneck wasn't the model, it was memory . That post described the problem. This one is about the fix I shipped, and the uncomfortable thing it taught me about \"instructing\" a model. The setup I build and run our products — a Swiss job platform, a handful of sites, the infrastructure under them — with a cockpit that keeps ~9 Claude Code…",
  "key_points": [
    "Author shifted approach to provide project context to Claude Code sessions.",
    "Implemented server-side memory retrieval before model receives first turn.",
    "Preserved fallback mechanism if memory retrieval fails."
  ],
  "editors_take": "Shifting memory retrieval from AI agents' prompts to a server-side step ensures the model always has necessary context, guaranteeing reliability and preventing defects from going unnoticed.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}