History
Every request is kept as an OpenCode session, so you can see what each app asked and what the model answered. Plugboard keeps the full caller transcript in each session (system prompt, messages, images as attachments, tool calls and results) plus the reply. A ten-turn chat is ten sessions, each complete.
- Title. The first user message. When the caller sent an end user (
user, or Anthropic'smetadata.user_id), the title starts with it, as[alice] .... See End users. - Session header. Every chat response carries an
x-plugboard-sessionheader with the id of its session. With optionsessionUrlset, it also carriesx-plugboard-session-url, a link to that session's page. See Session links.
Where it lives
Each session is filed under a per-app directory, so it never shows up in your real projects:
$XDG_DATA_HOME/opencode-plugboard/<app>/ # default ~/.local/share/opencode-plugboard/<app>/That directory only groups sessions: it is the directory a session is filed under. The prompts and replies are not stored in it. OpenCode keeps them in its own database, opencode.db in its data directory (opencode debug paths prints the exact location, and OPENCODE_DB can override it). So deleting, locking down or backing up the app directory removes, protects or saves no history. To back up, restrict or purge history, work on that database, or remove sessions through OpenCode (examples/_tools/sessions.py does that for one app's anchored requests).
History records every prompt and reply, so treat OpenCode's database as sensitive.
Request records
Beside each session, plugboard keeps a record of the HTTP exchange that made it (option history.storeRequestBody, on by default, per app or global): the request as received, the full response as sent, the timing, the routing, the usage and every error. A streamed answer is stored as its raw SSE bytes and as the assembled final answer. The outputs are the model's full answers, not only the prompts. Records live in the same OpenCode database, are not capped, and are not removed when their session is pruned. An app's key reads its own with GET /plugboard/requests/{request id or session id}. See Stored requests.
Where you see it
In OpenCode the sessions appear as one group per app in the desktop and phone app home screen. In the TUI they are visible in the all-projects view (ctrl+a), not in a project's own list.
With sessions.hideFromList each request session is archived as soon as it is created, so the lists stay empty. See Hidden app sessions. The sessions and their pruning are the same either way.
Pruning
Sessions older than 30 days are deleted by default (sessions.maxAgeDays). maxAgeDays: 0 keeps them.
Each app can set its own sessions (apps.<name>.sessions). A field replaces the global one for that app and an unset field falls back to it, so a bot can keep 20 sessions while a coding app keeps 5000. Two things to know:
- The global
maxAgeDaysdefaults to 30, so an app that sets onlymaxSessionsis still pruned after 30 days. Set itsmaxAgeDaysto keep it longer. - An app cannot set
0(keep forever). Use a large value such as36500.
Sweeps run on requests, at most every 10 minutes, in bounded batches, and never touch a running session. Pruning covers the sessions plugboard has indexed. A session created before the index existed is never pruned: remove it in OpenCode. OpenCode's own backups keep copies of pruned sessions.
Deleting a session deletes the sessions started under it, so when pruning finds that a request session has a child session it gives the request up instead: the index entry is dropped and the session is never deleted, even after those children are removed. Plugboard never starts a child from a request session, so the child is yours or another plugin's, and it survives. Once pruning finds children, plugboard relinquishes the request permanently, and the request stops counting toward maxSessions and maxAgeDays. The check is a query made just before the delete, so a child created in that moment can still be taken with the session: OpenCode has no conditional delete. On OpenCode 2.0.x, whose plugin API cannot list sessions, the sweep cannot ask at all and may delete the request's children with it.
Plugin loading
OpenCode loads plugin hooks per directory, so plugboard has to be loaded in those app directories, which is why it needs the global config. Everywhere outside the data root it is inert: it only joins the shared listener and registers no hooks, tools or agent rules, so your real projects behave as before.