You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
session: full-text search across session message content (only titles are searchable today) #53063
Sessions are the primary artifact opencode accumulates, but their content is not searchable: the session list's search parameter only matches the session title (like(SessionTable.title, ...) in the session store's list query). Once a project has more than a handful of sessions, finding "that conversation where we fixed X" means opening sessions one by one. This proposes full-text search over session message content, built on SQLite's built-in FTS5 — no new dependencies.
Current behavior
GET /session list accepts search, but the store applies it only to session.title.
Message content lives in SQLite, so the data needed for retrieval is already there; it is just not indexed.
No FTS table exists in the migration set today.
Proposal
Index: a session_message_fts FTS5 virtual table (contentless or external-content, tied to the message table) created by a standard migration, with a one-time backfill of existing rows.
Sync: keep it fresh either via SQLite triggers or at the application write path — see open question 3.
API: extend the session list query (or add a dedicated GET /session/search) returning matching sessions plus matched message snippets.
TUI: a search entry in the /sessions surface that lists hits with snippets and jumps to the session.
Phased plan
Phase 1 — migration + backfill + store query + HTTP route (usable from the API, independently mergeable).
I'm happy to implement this; phase 1 alone is a self-contained PR.
Open questions
Scope of indexed content: user + assistant text only (my default suggestion), or also tool calls/outputs? Tool output would grow the index much faster.
TUI surface: search box inside /sessions, or a separate command?
Index maintenance: SQLite triggers (simplest, migration-friendly) vs. writing through the application's message write path (more explicit, matches the event/projector architecture)?
Index growth: acceptable to index everything unbounded per project, or should there be a cap/retention knob?
Closing in favor of #41354, which is the established track for this request (and where I've consolidated the FTS5 implementation sketch from this issue: #41354 (comment)). I missed #38973/#41354/#45801 in my pre-flight search — apologies for the noise.
Activity
github-actions commentedon Oct 4, 2026
This issue doesn’t fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:.Please edit this issue to address the above within 72 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.
ggbdpq commentedon Oct 4, 2026
Closing in favor of #41354, which is the established track for this request (and where I've consolidated the FTS5 implementation sketch from this issue: #41354 (comment)). I missed #38973/#41354/#45801 in my pre-flight search — apologies for the noise.