OpenCode session archive with frontend

Self-hosted session archive hero banner
Session archive hero

If you work with AI coding assistants every day, you know the problem: the conversation log — every session, every prompt, every tool call — quietly grows into a multi-gigabyte database. Searching it becomes slow, backups take forever, and the things you actually want to remember (that fix for a tricky bug, that refactor pattern, that one command) are buried under thousands of rows of chit-chat.

This article describes a pattern we use in production: a self-hosted archive system that copies old opencode sessions out of the live database into a separate, compact, full-text-searchable archive — then exposes it through a fast web UI that your whole team can search, protected by single sign-on.

The best part: the whole thing is built from boring, proven pieces — SQLite, FTS5, a small Python script, cron, and a tiny web layer. No Elasticsearch cluster, no managed search service, no vendor lock-in.

Let me show you how to build it.

Continue reading “OpenCode session archive with frontend”