Persistent Project Memory for Claude Code
Claude Code excels at autonomous multi-file edits, until context compaction or a new terminal session wipes the reasoning behind past choices. OpenLotus acts as an independent project memory and drift control layer over stdio MCP.
OpenLotus adds an independent project memory and drift control layer alongside Claude Code. While CLAUDE.md holds static workspace rules, OpenLotus preserves accumulated project knowledge, records decisions and development state across sessions, and reconciles live git reality to catch drift.
1. Why Claude Code projects need memory beyond individual sessions
Long-running repositories accumulate architectural decisions, rejected approaches, security boundaries, and live task state across dozens of Claude Code runs. When a conversation hits compaction or you open a fresh terminal, that working context disappears.
Without an independent project record, Claude Code spends tokens re-reading the same modules, rediscovering settled constraints, or retrying strategies that already failed earlier in the week.
2. How Claude Code handles context today vs what OpenLotus adds
Claude Code already supports CLAUDE.md instruction files and native session context within a workspace. Those mechanisms are useful for static repo conventions, but they do not automatically sense live git reality, track open tasks, or detect when implementation drifts from declared plans.
OpenLotus sits alongside CLAUDE.md as an independent MCP server (npx openlotus agent) and CLI reality sensor (npx openlotus sync). CLAUDE.md holds standing rules; OpenLotus holds the live ProgressMap, immutable decision ledger, failure history, and drift checks.
3. Real integration workflow (MCP + auto-detected CLAUDE.md)
Running npx openlotus pair in your repo detects Claude Code, registers the openlotus MCP server in .mcp.json, and injects the Event -> Tool Trigger Matrix into CLAUDE.md.
- Session start: Claude Code calls read_scratchpad, get_memory (tier 1), get_drift, and manage_tasks.
- During work: architectural choices log via record_decision; failed attempts log via report_failure + record_lesson.
- After commits: a local post-commit hook triggers npx openlotus sync to keep dashboard reality fresh.
npx openlotus pair npx openlotus bootstrap npx openlotus sync
4. Honest limitations & what OpenLotus does not replace
OpenLotus does not replace Git, your test runner, or your repository source files. It never uploads file bodies to the cloud; get_reality sends structural signals (branch, HEAD, dirty file count, TODO counts, language stats) alongside the decisions and tasks your agent explicitly records.
Claude Code native files vs OpenLotus MCP layer
| What matters | Native Claude Code context | With OpenLotus MCP |
|---|---|---|
| Standing rules | Static CLAUDE.md markdown edited manually | CLAUDE.md trigger matrix + structured read_constraints / record_constraint |
| Decision history | Lost after session reset or compaction unless manually summarized | 3-tier lossless ledger (record_decision with domain, evidence, supersedes) |
| Drift detection | No automated check between declared plan and uncommitted git state | get_drift reconciles live git reality against declared goals and constraints |
| Cross-agent continuity | Tied to Claude Code workspace files | Shared across Claude Code, Cursor, OpenCode, Codex, and Antigravity |
Common Questions
Does OpenLotus replace CLAUDE.md?
No. OpenLotus works alongside CLAUDE.md. When you pair a repo with Claude Code detected, OpenLotus appends a compact Event -> Tool Trigger Matrix to CLAUDE.md so Claude knows when to call each MCP tool.
Does OpenLotus upload my source code?
No. get_reality inspects local git metadata (branch, commit count, changed file counts, TODO counts) and never uploads file contents.
Git remembers what changed. OpenLotus remembers why.
Give your AI coding tool a permanent project memory and catch drift before broken code piles up.