{"slug": "i-built-persistent-memory-for-ai-coding-tools-one-install-every-tool-no-more-re", "title": "I built persistent memory for AI coding tools one install, every tool, no more re-explaining context", "summary": "A developer built EGC (Extended Global Context), an open-source tool that gives AI coding assistants persistent memory across sessions and tools. The tool installs two MCP servers into 13 supported AI coding tools, automatically saving and loading project context so developers no longer need to re-explain their codebase, decisions, or next steps. EGC reduces context rebuilding from roughly 1,500 tokens per session to about 200 tokens, and is available on GitHub under the MIT license.", "body_md": "Every AI coding session starts from zero.\n\nClose Claude Code and open it tomorrow. The AI doesn't know your project. You spend the first 10 minutes re-explaining the stack, the architectural decisions from last week, the approach that failed after three attempts.\n\nIt gets worse when you switch tools. Move from Cursor to Codex and you start over again.\n\nI got tired of this. So I built EGC — Extended Global Context.\n\nOne install. Every tool. Permanent memory.\n\n`sh install.sh`\n\ndetects which AI tools you have (Claude Code, Cursor, Codex, Gemini CLI, OpenCode, Windsurf, Kiro, Trae, CodeBuddy) and registers two local MCP servers in all of them. It also writes the memory protocol into each tool's global instruction file, so the AI calls `get_state({})`\n\nat session start and `update_state({})`\n\nat session end — automatically.\n\nThe state file lives at `~/.egc/state/`\n\non your machine. It follows the project, not the IDE.\n\nYou open Claude Code on a project you haven't touched in two weeks. Without typing anything:\n\nState loaded from egc-memory\n\nContext acknowledged.\n\nReady to pick up:\n\n• Fix the auth middleware regression\n\n• Add rate limiting before deploy\n\n• Decision: use Redis, not in-memory (discussed 2 sessions ago)\n\nThe AI already knows. You just start working.\n\nRebuilding context from scratch costs ~1,500 tokens per session. EGC delivers the same in ~200 tokens.\n\n20 sessions/month = ~$0.08 saved. The money is small. The interrupted flow is not.\n\nRequires Node.js 20+.\n\n```\nbash\nnpm install -g @egchq/egc\negc install\n\nThat's it. Run egc doctor to verify.\n\nThe two MCP servers\n\negc-memory — the one you use every session\n- get_state — reads project memory at session start\n- update_state — saves decisions, preferences, next steps\n- store_decision — persists a decision to SQLite\n- query_history — returns past decisions by timestamp\n\negc-guardian — runs in the background\n- validate_command — blocks shell injection\n- validate_write — blocks writes to sensitive paths\n- reduce_context — deduplicates Markdown payloads\n\nIt's open source\n\nGitHub: https://github.com/Fmarzochi/EGC\n\nMIT license. Built by one developer. 13 supported tools. If it saves you time, a star helps other developers find it.\n\n---\nIf you've been re-explaining context every session, try it and let me know what breaks.\n![ ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7y8tf9v3gtaqdwln2wye.png)\n```\n\n", "url": "https://wpnews.pro/news/i-built-persistent-memory-for-ai-coding-tools-one-install-every-tool-no-more-re", "canonical_source": "https://dev.to/fmarzochi/i-built-persistent-memory-for-ai-coding-tools-one-install-every-tool-no-more-re-explaining-context-45om", "published_at": "2026-06-11 20:37:13+00:00", "updated_at": "2026-06-11 20:41:20.381495+00:00", "lang": "en", "topics": ["ai-tools", "ai-products", "ai-infrastructure", "ai-agents", "large-language-models"], "entities": ["Claude Code", "Cursor", "Codex", "Gemini CLI", "OpenCode", "Windsurf", "Kiro", "Trae"], "alternates": {"html": "https://wpnews.pro/news/i-built-persistent-memory-for-ai-coding-tools-one-install-every-tool-no-more-re", "markdown": "https://wpnews.pro/news/i-built-persistent-memory-for-ai-coding-tools-one-install-every-tool-no-more-re.md", "text": "https://wpnews.pro/news/i-built-persistent-memory-for-ai-coding-tools-one-install-every-tool-no-more-re.txt", "jsonld": "https://wpnews.pro/news/i-built-persistent-memory-for-ai-coding-tools-one-install-every-tool-no-more-re.jsonld"}}