r/opencode • • 16d ago

V2 plugin for semantic/keyword search across conversation history

This plugin adds a tool allowing agents to search the full conversation history (user/agent messages, tool results) across the current session, all sessions in the current project, or all indexed projects on the system.

It uses a fork of semble to provide the fast, CPU-based (no GPU needed), on-the-fly semantic embedding + BM25 keyword search functionality.

https://github.com/jabr/opencode-history-plugin

Demo time. Real question, real retrieval: what did past sessions conclude about WebRTC vs WireGuard? — one that should fan out across projects, then expand to pull the actual conclusion out of the reasoning.

✓execute
›history.search [query=webRTC vs WireGuard for peer connectivity NAT traversal, project=all, limit=5]
›history.expand [message=msg_d9a9e5682001rMkACRlp113liw]
›history.expand [message=msg_d9a9b367a002B1VdQYK1vFlkvT]
›history.expand [message=msg_dae107778002tJiGeBqS2a8Tv1]

The report itself (hit #1's text block) is a real conclusion, not a fragment: RTT data exists only behind the InspectMachine gRPC endpoint (MachineDetails.Rtts); ListMachines has no Rtts field at all. uc machine rtt and uc wg show already display it; the natural candidate to add it is uc machine ls, with the catch that "RTT is inherently directional… a single column per machine is not straightforward." That's the kind of thing you'd otherwise re-derive by reading five Go files.

There's also a human-readable (with optional markdown highlighting) CLI interface to the same functionality for you to run your own searches, e.g:

$ history-search "gpu support"

  ── 1. Implementing devices support in compose.yaml

  msg_c27422346001UrQixvD7Z4mz2L · assistant · Feb  3 2026, 22:06 · score 0.013

  assistant(build):
  [reasoning] **Adding Device Support**

  I'm currently focused on incorporating the `devices` option from `compose.yaml` files into the Uncloud project. I've started extracting the `Devices` field from `compose.yaml` parsing within `pkg/clie…
  I'll help you add support for the `devices` option in `compose.yaml` files.


  ── 2. New session - 2026-02-27T04:00:29.586Z

  msg_c9d469a7d002oJEHGb4eMUJk14 · assistant · Feb 26 2026, 20:06 · score 0.008

  - ✅ `CapAdd`, `CapDrop` - Supported
  - ✅ `Sysctls` - Supported
  ...

Also, if interested, I have an intra-agent messaging and monitoring plugin, as well: (https://github.com/jabr/opencode-team-plugin). It allows different sessions in a project (or cross-project) to exchange messages directly and watch/read their current activity.

2 Upvotes

1 comment sorted by