Skip to content

Controlplane: cross-session chat search + memory layer (Claude's pattern) #18

@heavygee

Description

@heavygee

Problem

The controlplane / overseer notion (#10) is fundamentally a long-running agent that must:

  • Know about every project, every PR, every session
  • Remember decisions made days/weeks ago
  • Track which issue spawned which session that spawned which PR

This is more context than any single session window can hold. Without persistent searchable memory, the controlplane becomes amnesiac after a few hundred messages and either forgets prior decisions or asks the operator to re-ground it every time.

Claude has shipped the primitive we need:

https://support.claude.com/en/articles/11817273-use-claude-s-chat-search-and-memory-to-build-on-previous-context

Cross-conversation search + memory that builds on previous context.

Proposal

Implement a memory + search layer for the controlplane (and optionally for all sessions):

  1. Per-session memory -- already kind of exists in the message history.
  2. Cross-session memory -- FTS5 (SQLite full-text search) over all messages for a given user/project, with metadata filters (session id, role, timestamp, channel source).
  3. Memory tool -- agents call searchMemory({query, scope?: 'session' | 'project' | 'all'}) to retrieve past context relevant to the current turn.
  4. Active recall -- agents emit "remember this" markers (<memory>...</memory>) for important decisions. The memory layer indexes these with higher weight.
  5. Compaction-aware -- when a session's context window fills, the memory layer can serve compressed summaries of older turns from this store.

Inspiration: the context-mode MCP project that's already in use here uses FTS5 + auto-indexing for exactly this pattern. Steal liberally.

Acceptance

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions