CSM adds long-term memory to opencode coding agents
CSM is a GitHub project that adds memory across sessions to the opencode . Many lose earlier choices, project status, and when a new chat starts, but CSM is meant to keep preferences, lessons, decisions, and working knowledge available over time.
Each new session begins with an 8-layer covering identity, preferences, , beliefs, limits, active goals, work notes, and handoff state. This lets the assistant continue from the last known project state instead of starting with a blank conversation.
The project description claims more than 56,000 memories have been used in production. The main goal is to help an AI agent avoid repeated mistakes and keep over many conversations.
Key points
- CSM adds cross-session memory to the opencode .
- It stores preferences, decisions, lessons, and working knowledge for later sessions.
- New sessions receive an 8-layer with goals, constraints, work notes, and handoff state.
- The project claims more than 56,000 memories have been used in production.
- The possible token-saving value comes from passing compact state instead of full .