Ask a quick follow-up question mid-session without losing context or cluttering the main thread.
Explore a tangential idea or debug a side issue while keeping your main conversation intact.
Get clarification on a specific point and optionally merge the answer back into your main session.
Add one entry to ~/.config/opencode config file; no external dependencies or API keys required.
opencode-mini-session is a small plugin for OpenCode, an open-source terminal AI coding assistant. The plugin solves a specific workflow problem: you are deep in a long coding session with the AI, and a side question pops into your head that you do not want to clutter the main thread with. Pressing alt+b, or typing /mini in the command palette, pops up a small overlay window with a text input. You ask the side question there, get an answer, and the main conversation is left untouched. The overlay is not a fresh chat. The plugin first reads the current session's history, including user questions, assistant replies, and short summaries of any tool calls the AI ran. That text is then trimmed to fit a configurable token budget, by default 50000 tokens, and wrapped in a session-context block placed in the side conversation's system prompt. The result is that the mini session knows what was being discussed when you opened it, so a follow-up like why does that approach not work makes sense without having to re-explain. The mini session itself is a temporary isolated thread. Replies stream in as they arrive. You can ask several follow-up questions inside the popup. When you close it, the ephemeral session is deleted. There is also an option to inject the full mini-session transcript back into the main thread if you decide the side conversation was useful enough to keep. Several keys are bound inside the overlay: enter sends the question, alt+b hides the overlay so you can come back to it later, tab switches the model for the next question, and esc or ctrl+c cancels and closes. A command called /mini-model changes the model used for future mini sessions. The plugin is installed by adding an entry to the OpenCode TUI config file under ~/.config/opencode. Options include the model identifier, the token limit, the trigger keybind, and the list of tools the mini agent is allowed to call. The tool list defaults to read-only operations such as glob, grep, list, read, and webfetch.
Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.