Skip to content

search_conversations only indexes user prompts, missing work by what was done #2

Description

@RyanSeanPhillips

Problem

The search_conversations MCP tool indexes only the prompts the user typed — grouped by session, ranked by recency, with all space-separated terms ANDed. It does not index:

  • assistant responses
  • tool calls / results
  • edited or created file paths
  • any per-session summary

Consequence

You can't find a conversation by what was done unless the user happened to type those exact words. Recall fails whenever a later description differs from the original phrasing, and adding search terms makes it worse (AND → zero hits).

Concrete miss

Searching for the phillips-website dark→light theme conversion returned 0 results for every natural query — light theme website, phillips-website theme, site light accent. The session was only relocated via an originSessionId field stamped inside a memory file, not via search. Today the reliable way to relocate past work is memory-file back-links, not the search tool.

Other rough edges

  • Ranked by recency, not relevance (no score / BM25).
  • No project filter param — must eyeball the project field.
  • Strict AND on terms: single-word queries flood, multi-word queries starve.

Proposed improvements (rough priority)

  1. Index more than prompts. Pull assistant text + tool_use names + touched file paths from the JSONL so queries match the work, not just the ask. Biggest win for the "what did I work on" use case.
  2. Per-session summary index. Generate/store a one-line "what happened" per session and search that — cheaper to scan, robust to phrasing drift.
  3. Add a project filter param and relevance ranking; consider OR/fuzzy so extra terms don't zero out results.
  4. Surface originSessionId back-links so a topic match in memory can point straight at the source conversation.

Where

The tool lives in the cldctrl MCP server's search_conversations handler, which currently scans JSONL for user-role messages only. Extend the index builder to also emit assistant text + tool names + touched file paths (and optionally a summary line); add optional project and relevance params to the tool schema.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions