Memtrace: Persistent, Time-Aware Codebase Memory for Claude Code Agents

✍️ OpenClawRadar📅 Published: May 4, 2026🔗 Source
Memtrace: Persistent, Time-Aware Codebase Memory for Claude Code Agents
Ad

Every long Claude Code session suffers from stale context: the agent re-reads the same files, forgets interface details, and refactors without understanding blast radius. Memtrace is a free, open-source memory layer that fixes this by maintaining a continuously updated, time-aware representation of your codebase.

Two Core Capabilities

  • Always-fresh state: Every edit triggers a 42ms incremental snapshot of changes applied by the agent. The agent never works from session-old memory — after a refactor, it knows every caller, test, and consumer of the touched function immediately.
  • Rewind and replay: The codebase is stored bi-temporally (valid_time + transaction_time per node/edge), allowing queries like “what did this function look like Monday” and replaying how a broken function evolved commit-by-commit.
Ad

Architecture & Performance Bets

Zero LLM inference during indexing: Tree-sitter parses code into an AST, which becomes the structural representation. Retrieval is hybrid — Tantivy BM25 for lexical recall and Jina-code 768-dim embeddings indexed in HNSW for semantic recall, fused with Reciprocal Rank Fusion at k=60. Jina-code is trained on code, so it understands “this is an auth handler” without pattern-matching the word “auth.”

Bi-temporal layer enables typed edges (CALLS, IMPORTS, IMPLEMENTS, EXTENDS, CONTAINS, TYPE_REFERENCES, INSTANTIATES) traversed in graph time, giving the agent blast radius before refactoring. Speed is critical: indexing path bottlenecks on I/O, not LLM tokens, making snapshotting cheap enough to run on every edit.

Approval & Limits

The binary requires an approval key due to edge cases from real beta users (mixed pnpm/npm lockfiles, Rust proc-macros, Python TYPE_CHECKING blocks). Approvals are capped at 50 per week, with a target under 24h. The benchmark harness is fully open and runnable without the key. Repo + waitlist: github.com/syncable-dev/memtrace-public

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also

llmLibrarian: Local RAG Engine with MCP Integration for File-Based AI Search
Tools

llmLibrarian: Local RAG Engine with MCP Integration for File-Based AI Search

llmLibrarian is a local RAG engine that exposes retrieval over MCP, allowing AI agents like Claude to query indexed files. It uses ChromaDB collections for organization, Ollama for synthesis, and keeps everything on-device.

OpenClawRadar
OpenEvol: Offline Self-Improvement Pipeline for LLMs Using Conversation History
Tools

OpenEvol: Offline Self-Improvement Pipeline for LLMs Using Conversation History

OpenEvol v0.1.1 is an offline pipeline that automatically mines AI conversation history to create fine-tuning datasets without manual labeling. It runs on CPU initially and supports five teacher backends including OpenAI-compatible APIs and HuggingFace Transformers.

OpenClawRadar
Slack Message Formatter: Fix Claude's Broken Markdown in Slack
Tools

Slack Message Formatter: Fix Claude's Broken Markdown in Slack

A developer built a skill that converts Claude-generated Markdown to proper Slack formatting, solving issues where bold text shows as asterisks, links appear raw, and tables break. The tool offers both browser preview with rich HTML copy-paste and API webhook support.

OpenClawRadar
DAUB MCP Server Lets Claude Generate and Render UIs via JSON Specs
Tools

DAUB MCP Server Lets Claude Generate and Render UIs via JSON Specs

DAUB is an MCP server that enables Claude to generate UI interfaces directly from natural language prompts, producing structured JSON specs that render as live interfaces without code generation or compilation. It exposes four tools including generate_ui, render_spec, validate_spec, and get_component_catalog.

OpenClawRadar