recall
Search past Claude Code, Codex, pi and Grok sessions. Triggers: /recall, "search old conversations", "find a past session", "recall a previous conversation", "search session history", "what did we discuss", "remember when we"
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Badge for your README
Markdown
[](/listings/arjunkmrm--recall)HTML
<a href="/listings/arjunkmrm--recall"><img src="/api/listings/arjunkmrm--recall/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
npx skills add arjunkmrm/recall
Then use `/recall` in Claude Code (or Codex, pi, or Grok) or ask "find a past session where we talked about foo" (you might need to restart your agent).
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
SKILL.md · Manifest · 115 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- ---
- name: recall
- description: >
- Search past Claude Code, Codex, pi and Grok sessions. Triggers: /recall, "search old conversations",
- "find a past session", "recall a previous conversation", "search session history",
- "what did we discuss", "remember when we"
- metadata:
- author: arjunkmrm
- version: "0.4.1"
- license: MIT
- ---
- # /recall — Search Past Claude, Codex, pi & Grok Sessions
- Search all past Claude Code, Codex, pi and Grok sessions using full-text search with BM25 ranking.
- ## Usage
- ```bash
- python3 ~/.claude/skills/recall/scripts/recall.py [QUERY] [--project PATH] [--days N] [--source claude|codex|pi|grok] [--limit N] [--reindex]
- ```
- ## Examples
- ```bash
- # List every session in the last day (no text search)
- python3 ~/.claude/skills/recall/scripts/recall.py --days 1
- # List every pi session in the last week
- python3 ~/.claude/skills/recall/scripts/recall.py --days 7 --source pi
- # Simple keyword search
- python3 ~/.claude/skills/recall/scripts/recall.py "bufferStore"
- # Phrase search (exact match)
- python3 ~/.claude/skills/recall/scripts/recall.py '"ACP protocol"'
- # Boolean query
- python3 ~/.claude/skills/recall/scripts/recall.py "rust AND async"
- # Prefix search
- python3 ~/.claude/skills/recall/scripts/recall.py "buffer*"
- # Filter by project and recency
- python3 ~/.claude/skills/recall/scripts/recall.py "state machine" --project ~/my-project --days 7
- # Search only Claude Code sessions
- python3 ~/.claude/skills/recall/scripts/recall.py "buffer" --source claude
- # Search only Codex sessions
- python3 ~/.claude/skills/recall/scripts/recall.py "buffer" --source codex
- # Search only pi sessions
- python3 ~/.claude/skills/recall/scripts/recall.py "buffer" --source pi
- # Search only Grok sessions
- python3 ~/.claude/skills/recall/scripts/recall.py "buffer" --source grok
- # Force reindex
- python3 ~/.claude/skills/recall/scripts/recall.py --reindex "test"
- ```
- ## Query Syntax (FTS5)
- - **Words**: `bufferStore` — matches stemmed variants (e.g., "discussing" matches "discuss")
- - **Phrases**: `"ACP protocol"` — exact phrase match
- - **Boolean**: `rust AND async`, `tauri OR electron`, `NOT deprecated`
- - **Prefix**: `buffer*` — matches bufferStore, bufferMap, etc.
- - **Combined**: `"state machine" AND test`
- - **CJK**: `issue化` — automatically uses trigram matching for Japanese/Chinese/Korean text
- ## After Finding a Match
- To resume a session, `cd` into the project directory and use the appropriate command:
- ```bash
- # Claude Code sessions [claude]
- cd /path/to/project
- claude --resume SESSION_ID
- # Codex sessions [codex]
- cd /path/to/project
- codex resume SESSION_ID
- # Grok sessions [grok]
- ```bash
- grok --resume SESSION_ID
- ```
- # Pi sessions [pi]
- cd /path/to/project
- pi --session SESSION_ID # full or partial id; pi resolves prefix matches
- ```
- Each result includes a `File:` path. Use it to read the raw transcript (auto-detects format):
- ```bash
- python3 ~/.claude/skills/recall/scripts/read_session.py <File-path-from-result>
- ```
- If results are missing `File:` paths, run `--reindex` to backfill.
- ## Notes
- - Index is stored at `~/.recall.db` (SQLite FTS5, auto-migrated from `~/.claude/recall.db`)
- - Indexes four sources: `~/.claude/projects/` (Claude Code), `~/.codex/sessions/` (Codex), `~/.pi/agent/sessions/` (pi), and `~/.grok/sessions/**/chat_history.jsonl` (Grok)
- - First run indexes all sessions (a few seconds); subsequent runs are incremental
- - Only user and assistant messages are indexed (tool calls, thinking blocks, state snapshots skipped)
- - Results show `[claude]`, `[codex]`, `[pi]`, or `[grok]` tags to indicate the source
- - Dual-table FTS: English queries use Porter stemming, CJK queries use trigram matching
- - Omit the query argument for **list mode** — every session in the window, sorted by recency, no FTS
- - Provide a query for full-text search; both modes accept `--project`, `--days`, `--source`, `--limit`
- - **Upgrading from 0.3.x**: run `--reindex` once to pull in pi sessions
- - **Upgrading from 0.4.x**: run `--reindex` once to pull in Grok sessions
- - **Upgrading from 0.2.x**: run `--reindex` once to build the CJK index
README.md · README · 64 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- # recall
- Ever lost a conversation session with Claude Code, Codex, pi or Grok and wish you could resume it? This skill lets your agents search across all your past conversations with full-text search. Builds a SQLite FTS5 index over `~/.claude/projects/`, `~/.codex/sessions/`, `~/.pi/agent/sessions/`, and `~/.grok/sessions/` with BM25 ranking, Porter stemming, CJK support, and incremental updates.
- ## Install
- ```bash
- npx skills add arjunkmrm/recall
- ```
- Then use `/recall` in Claude Code (or Codex, pi, or Grok) or ask "find a past session where we talked about foo" (you might need to restart your agent).
- ## How it works
- ### Index
- ```
- ~/.claude/projects/**/*.jsonl ──┐
- │
- ~/.codex/sessions/**/*.jsonl ───┼─▶ Index ──▶ ~/.recall.db (SQLite FTS5)
- │ [incremental - mtime-based]
- ~/.pi/agent/sessions/**/*.jsonl │
- ~/.grok/sessions/**/chat_history.jsonl ┘
- ```
- ### Query
- ```
- Query ──▶ Detect CJK? ──▶ FTS5 Match ──▶ BM25 rank ──▶ Recency boost ──▶ Results
- │ [half-life: 30 days]
- │
- ┌─────┴──────┐
- │ │
- No CJK Has CJK
- porter trigram
- unicode61 table
- │ │
- └─────┬──────┘
- ▼
- snippet extraction
- highlighted excerpts
- ```
- - Indexes user/assistant messages into a SQLite FTS5 database at `~/.recall.db`
- - First run indexes all sessions (a few seconds); subsequent runs only process new/modified files
- - Dual-table FTS: Porter stemming for English, trigram tokenizer for CJK (Japanese, Chinese, Korean)
- - CJK messages are selectively indexed into the trigram table; query routing is automatic
- - Skips tool_use, tool_result, thinking, and image blocks
- - Results ranked by BM25 with a slight recency bias (recent sessions get up to a 20% boost, decaying with a 30-day half-life)
- - Results tagged `[claude]`, `[codex]`, `[pi]`, or `[grok]` with highlighted excerpts
- - No dependencies — Python 3.9+ stdlib only (sqlite3, json, argparse)
- ## Tests
- ```bash
- python3 -m unittest discover tests -v
- ```
- Stdlib `unittest` only — no test deps. Synthetic JSONL fixtures generated
- in `tmpdir` from the suite itself (no fixture files committed). An
- integration test runs against any real pi sessions in `~/.pi/agent/sessions/`
- on the host and is skipped if none are present.
- ## Contributing
- Found a bug or have an idea? [Open an issue](https://github.com/arjunkmrm/recall/issues) or submit a pull request — contributions are welcome!
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.