The Problem Every OpenCode session starts from scratch. Your AI doesn't remember past conversations, decisions, or solved problems. You repeat context over and over. The Solution opencode-mempalace-persistence is a pure TypeScript plugin that auto-saves every conversation to MemPalace — a local vector database with 96.6% recall on LongMemEval. No cron, no cloud, no API keys. Architecture The plugin uses two OpenCode hooks: chat.message — when you send a new question, the previous turn (question + answer) is saved session.idle — catches the last turn before you close OpenCode Each turn is categorized by wing type (developer, creative, emotions, family, consciousness) and fed to MemPalace's vector store. Knowledge Graph facts (decisions, milestones, problems, preferences) are extracted automatically. The mining runs asynchronously — state is saved immediately, and MemPalace indexing happens in the background. The UI is never blocked.…