The Problem: AI Agents Forget Crucial Decisions
Anyone who has spent significant time with AI code assistants like Claude Code or Codex has encountered a familiar frustration. You and the agent agree on a specific approach: "We're going with option A, not B, because of reason C." An hour later, after the AI's context window has been compacted, the agent will nonchalantly propose option B as if the previous discussion never happened. The original reasoning, vital for maintaining project direction, is simply gone from its active memory.
This ephemeral nature of AI context is a major bottleneck for productive, long-term collaboration with these tools. Developers end up repeating themselves, re-explaining decisions, and fighting against the AI's tendency to lose track of established project requirements and past discussions.

Introducing myc: A Local, Persistent Memory Layer
A new open-source project, myc (short for mycelium), aims to solve this exact problem. Unlike cloud-based memory APIs that add complexity and potential privacy concerns, myc operates entirely locally. It functions as a lightweight layer for task management and memory persistence, requiring only a single SQLite file alongside your project. This approach ensures that your AI's memory is tied directly to your project, not a remote server, and importantly, it doesn't require any API keys.
myc's core design revolves around providing a robust, yet simple, mechanism for AI agents to retain and recall critical information, even as their context windows are managed and compacted.
Key Features of myc
myc is built with several key functionalities designed to address the memory limitations of current AI agents:
Task Queue with Dependency Management
The project includes a sophisticated task queue. This queue supports dependencies between tasks, allowing for complex workflows where one task must complete before another can begin. It also implements atomic task acquisition, ensuring that two agents or processes never attempt to work on the same task simultaneously. This is crucial for distributed or multi-agent systems where coordination is key.
Hybrid Decision Journal
At the heart of myc's memory capabilities is a decision journal. This journal logs important interactions and decisions made during a coding session. To ensure that past decisions can be easily retrieved, myc employs a hybrid search mechanism that combines traditional keyword-based search (BM25) with semantic vector search. This allows users to find relevant past discussions not just by exact wording, but also by conceptual similarity.
PreCompact Hook for Session Persistence
The most innovative feature is the 'PreCompact' hook. Just before the AI's context window is compacted, myc intervenes. It writes the current session's critical information to disk, masking any sensitive secrets. It then injects a concise "rescue package" back into the AI's context. This package contains the essential summary of past decisions and context that is most likely to be lost during compaction. This mechanism ensures that the AI retains a memory of what truly matters, surviving the inevitable pruning of its short-term context.
Automatic Decision Extraction
myc is designed to automatically extract key decisions from the conversation. This means developers don't need to manually tag or record every important agreement. The system intelligently identifies and logs crucial points, reducing the manual overhead required to maintain a persistent memory log.
Technical Implementation and Local Operation
The choice of SQLite as the backend is deliberate. It provides a single, self-contained file that is easy to manage, back up, and move. This local-first approach eliminates the need for complex server infrastructure or cloud dependencies, making myc accessible to anyone who can run a local process. The MIT license further encourages adoption and modification.
For developers, this means that the AI's memory is no longer a black box managed by a third-party API. Instead, it's a tangible artifact of the project, stored locally and under the developer's control. The integration is designed to be straightforward, likely involving a small agent process that interfaces with the AI and the SQLite database.
The Impact on AI-Assisted Development
The implications of myc are significant for the future of AI-assisted coding. By providing a persistent, localized memory, myc directly addresses one of the most persistent pain points in using advanced AI agents for complex, long-running tasks. Developers can now expect their AI collaborators to remember crucial decisions, maintain project coherence over extended periods, and build upon previous work without constant re-briefing.
This could lead to more sophisticated AI-driven workflows, where agents can reliably manage larger projects, track intricate dependencies, and act as more consistent partners in the development process. The local nature also enhances privacy and security, as sensitive project details and code snippets are not transmitted to external servers.
An Unanswered Question: Scalability and Complexity
While myc offers a compelling solution for current AI agents, a key question remains: how will this local memory approach scale to truly massive projects or highly complex multi-agent systems? The current implementation relies on a single SQLite file and a local process. As the volume of logged decisions and task dependencies grows, maintaining performance and efficient retrieval will be critical. Further research and development may be needed to explore distributed storage or more advanced indexing techniques if myc is to support enterprise-scale AI development teams.
