you can also work with the opencode sqlite database directly
I use the exported sessions for a number of things, "backups" is another, though it is more about building a complete data set of all my sessions than making sure they are not lost
i wrote a cli tool to query the opencode sqlite database. it's not great, i would want to improve it more before announcing it, but: it works for me and my agents. it was easy to write/understand. https://tangled.org/jauntywunderkind.bsky.social/opencoattai...
i also am working on bookmark features too! a skill and more cli, i'll add a tool too, but often i don't even use tools, just have the cli use the shell. it shows up nicely in it's own atuin, which is rad. but the otel isn't as good.
I prefer json to sql, because I need the json version for various reasons. Sqlite text searching is leaving a lot on the table compared to a Typesense based setup imo