{"slug": "your-ai-coding-agent-forgets-your-project-every-session-here-is-what-i-built-it", "title": "Your AI coding agent forgets your project every session. Here is what I built about it", "summary": "A developer built Codelux, a local daemon that gives AI coding agents persistent project memory across sessions via MCP on localhost, indexing a 120-file Go project in about three seconds and cutting tokens on a single file read by up to 90%. The tool stores files, symbols, call flows, notes and decisions in a local database, with a Team plan syncing decisions between two developers' machines in under a second end-to-end encrypted. The daemon is not open source, and the developer notes that on a small repo in a single short session a good grep is often just as cheap.", "body_md": "*Disclosure up front: I build Codelux, the tool in this post. There is a free plan and paid plans. I'll try to keep this useful even if you never install it.*\n\n## \n  \n  \n  The problem you already pay for\n\nIf you use a coding agent every day, you know the morning routine. You open a new session and the agent knows nothing. It re-reads the same files to rebuild the same picture of the codebase it had yesterday. You explain the architecture again. You remind it what was decided and why.\n\nThat costs you twice:\n\n- \n**Tokens.** Whole files go into the context window to find one function, and the whole conversation is re-sent on every turn.\n- \n**Decisions.** Why the code is built that way, what was tried and dropped: it lived in a chat that is gone. The agent may happily re-introduce the thing you removed last week.\n\nAnd if two people, or two agents, work on the same repository, they share nothing they learned. Each one rebuilds the same context on its own.\n\n## \n  \n  \n  What helps, with or without any tool\n\nBefore the product part, the habits that made the biggest difference for me:\n\n1. \n**Locate first, then read a window.** Grep or a symbol index to find the function, then read 30-60 lines around it. Reading a 400-line file to use 12 lines of it is the most common waste in a long session.\n2. \n**A new session per task, with a short handoff.** Goal, decisions taken and why, files touched, what is left. Ten lines in, instead of the whole history re-sent every turn.\n3. \n**Split notes by how they age.** Decisions and their reasons stay true, so write them down. Anything structural (where X lives, what calls what) rots quietly, so look it up in the code at read time instead of writing it into a file that will be wrong in a month.\n\nYou can do all three with plain markdown files and grep. I did, for a while. Then I automated it.\n\n## \n  \n  \n  The 2-minute demo\n\nWhat you see, all recorded on the real app:\n\n- \n**Indexing in seconds.** A 120-file Go project (the open-source gin framework) indexed locally in about 3 seconds: files, symbols and call flows go into a local database, and it stays up to date as you edit.\n- \n**Notes and decisions that carry over.** While the agent works it leaves notes and decisions in the project. The next morning a new Claude Code session calls`code_memory` and starts from yesterday instead of from a tour of the repo.\n- \n**Lookups instead of whole files.**`code_query` answers \"where is X, who calls it\" with file and line, and file reads come back in a compressed form: up to 90% fewer tokens on a single read.\n- \n**The Team plan.** Two developers on the same project: a decision one writes shows up on the other's machine in under a second, end-to-end encrypted, next to a team chat.\n\n## \n  \n  \n  How it plugs in\n\nCodelux is a small local daemon. Your agent talks to it over MCP on localhost (HTTP and a CLI also work), so it fits whatever you already use: Claude Code, Cursor, Codex, VS Code, Windsurf, JetBrains, Zed or any MCP client. For Claude Code there is a plugin with a setup skill:\n\nYour code, the index and the memory stay on your machine. Nothing is uploaded; AI calls go only to the provider you choose.\n\n## \n  \n  \n  What it does not do\n\nTo keep expectations honest:\n\n- It is not another agent and it does not write code for you. It is the space your agents work in.\n- On a small repo, in a single short session, a good grep is often just as cheap. The benefit shows up across sessions and across people, when the same understanding would otherwise be rebuilt again and again.\n- The daemon is not open source. The docs, the plugin and the issue tracker are on GitHub.\n\n## \n  \n  \n  Try it\n\nThe Free plan is free forever for one project per machine, no credit card: [codelux.ai/download](https://codelux.ai/download?utm=devto&cdi=post1)\n\nDocs: [codelux.ai/docs](https://codelux.ai/docs) · Issues and plugin: [github.com/codeluxai/codelux](https://github.com/codeluxai/codelux)\n\nI'd genuinely like to hear how you handle agent memory today, especially if your answer is \"markdown files and discipline\". That is where I started.", "url": "https://wpnews.pro/news/your-ai-coding-agent-forgets-your-project-every-session-here-is-what-i-built-it", "canonical_source": "https://dev.to/codeluxai/your-ai-coding-agent-forgets-your-project-every-session-here-is-what-i-built-about-it-5hgb", "published_at": "2026-09-25 09:54:10+00:00", "updated_at": "2026-09-25 10:00:43.410759+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-tools", "agent-protocols", "mlops"], "entities": ["Codelux", "Claude Code", "Cursor", "Codex", "VS Code", "Windsurf", "JetBrains", "Zed"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/your-ai-coding-agent-forgets-your-project-every-session-here-is-what-i-built-it", "markdown": "https://wpnews.pro/news/your-ai-coding-agent-forgets-your-project-every-session-here-is-what-i-built-it.md", "text": "https://wpnews.pro/news/your-ai-coding-agent-forgets-your-project-every-session-here-is-what-i-built-it.txt", "jsonld": "https://wpnews.pro/news/your-ai-coding-agent-forgets-your-project-every-session-here-is-what-i-built-it.jsonld"}}