Skip to content

Feature request: /recall:search command to search history.md #8

Description

@xiaolu-cmd

Feature request: /recall:search command to search history.md

Problem

As history.md grows over weeks or months of sessions, finding a specific past session becomes difficult. The user has to manually open the file and grep — there's no way to search from within Claude Code itself.

Example: "Find the session where we fixed the login bug" or "What was that command I ran three sessions ago?" — currently impossible without leaving Claude Code and grepping manually.

Proposed solution

Add a /recall:search slash command that searches history.md and returns matching sessions inline:

/recall:search login bug

Output: a list of matching sessions with date, session ID, and a snippet of the matched lines, newest first:

## 2026-06-22 — session a1b2c3d4
  **You:** the login redirect is broken after the auth middleware refactor
  **Claude:** traced the issue to the session token not being refreshed…

## 2026-06-15 — session e5f6g7h8
  **You:** add rate limiting to the login endpoint

Empty search (no keyword) could show the most recent N session headers, which also serves as a quick browse.

Implementation notes

  • Purely local (grep over history.md), consistent with Recall's zero-network guarantee.
  • A simple new script that reads history.md, filters by keyword, groups by session header, and prints results.
  • Already-redacted content stays redacted — search results respect the same privacy guarantees.

Alternatives considered

A full-text index (SQLite FTS) would be faster for very large histories, but adds complexity and a dependency. Starting with a simple grep keeps things lean and consistent with the rest of Recall.

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