Browse, search, and export OpenCode session history. Chat with AI, summarize sessions, view full conversation content including user messages, AI reasoning, tool calls, and file diffs.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Export to Markdown — Export selected messages as Markdown
Delete — Delete sessions or messages (with confirmation)
OpenCode Tab (New in 0.9.x)
AI Chat — Send messages to an OpenCode AI agent and view responses inline
Summarize — AI summarizes the current session's markdown files and conversation history
Stop — Interrupt AI processing at any time
Model Selection — Choose from available AI providers and models
Session Isolation — Each chat/summarize runs in its own session with restricted permissions to prevent runaway loops
How It Works
OpenCode stores session data in a SQLite database at ~/.local/share/opencode/opencode.db. This extension reads from that database using Python 3's built-in sqlite3 module (invoked via child_process).
The OpenCode Tab communicates with the OpenCode SDK (@opencode-ai/sdk) to start sessions and stream AI responses.
Data Structure
Table
Content
project
Directories where OpenCode was used
session
Sessions with title, directory, timestamps
message
Messages with role, agent, model, token usage
part
Actual conversation content — text, reasoning, tool calls, patches
Requirements
VS Code 1.80.0 or later
Python 3 installed and available as python3 in PATH
OpenCode installed with data at ~/.local/share/opencode/