/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
python3 ~/.claude/skills/recall/scripts/recall.py [QUERY] [--project PATH] [--days N] [--source claude|codex|pi|grok] [--limit N] [--reindex]
Examples
# 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:
# 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
1---
2name: recall
3description: >
4 Search past Claude Code, Codex, pi and Grok sessions. Triggers: /recall, "search old conversations",
5 "find a past session", "recall a previous conversation", "search session history",
6 "what did we discuss", "remember when we"
7metadata:
8 source: https://skillmd.com/skills/arjunkmrm/recall
9 author: arjunkmrm
10 version: "0.4.1"
11 license: MIT
12---
13
14# /recall — Search Past Claude, Codex, pi & Grok Sessions
15
16Search all past Claude Code, Codex, pi and Grok sessions using full-text search with BM25 ranking.
17
18## Usage
19
20```bash
21python3 ~/.claude/skills/recall/scripts/recall.py [QUERY] [--project PATH] [--days N] [--source claude|codex|pi|grok] [--limit N] [--reindex]
22```
23
24## Examples
25
26```bash
27# List every session in the last day (no text search)
28python3 ~/.claude/skills/recall/scripts/recall.py --days 1
29
30# List every pi session in the last week
31python3 ~/.claude/skills/recall/scripts/recall.py --days 7 --source pi
32
33# Simple keyword search
34python3 ~/.claude/skills/recall/scripts/recall.py "bufferStore"
35
36# Phrase search (exact match)
37python3 ~/.claude/skills/recall/scripts/recall.py '"ACP protocol"'
38
39# Boolean query
40python3 ~/.claude/skills/recall/scripts/recall.py "rust AND async"
41
42# Prefix search
43python3 ~/.claude/skills/recall/scripts/recall.py "buffer*"
44
45# Filter by project and recency
46python3 ~/.claude/skills/recall/scripts/recall.py "state machine" --project ~/my-project --days 7
47
48# Search only Claude Code sessions
49python3 ~/.claude/skills/recall/scripts/recall.py "buffer" --source claude
50
51# Search only Codex sessions
52python3 ~/.claude/skills/recall/scripts/recall.py "buffer" --source codex
53
54# Search only pi sessions
55python3 ~/.claude/skills/recall/scripts/recall.py "buffer" --source pi
56
57# Search only Grok sessions
58python3 ~/.claude/skills/recall/scripts/recall.py "buffer" --source grok
59
60# Force reindex
61python3 ~/.claude/skills/recall/scripts/recall.py --reindex "test"
62```
63
64## Query Syntax (FTS5)
65
66- **Words**: `bufferStore` — matches stemmed variants (e.g., "discussing" matches "discuss")
67- **Phrases**: `"ACP protocol"` — exact phrase match
68- **Boolean**: `rust AND async`, `tauri OR electron`, `NOT deprecated`
69- **Prefix**: `buffer*` — matches bufferStore, bufferMap, etc.
70- **Combined**: `"state machine" AND test`
71- **CJK**: `issue化` — automatically uses trigram matching for Japanese/Chinese/Korean text
72
73## After Finding a Match
74
75To resume a session, `cd` into the project directory and use the appropriate command:
76
77```bash
78# Claude Code sessions [claude]
79cd /path/to/project
80claude --resume SESSION_ID
81
82# Codex sessions [codex]
83cd /path/to/project
84codex resume SESSION_ID
85
86# Grok sessions [grok]
87```bash
88grok --resume SESSION_ID
89```
90
91# Pi sessions [pi]
92cd /path/to/project
93pi --session SESSION_ID # full or partial id; pi resolves prefix matches
94```
95
96Each result includes a `File:` path. Use it to read the raw transcript (auto-detects format):
97
98```bash
99python3 ~/.claude/skills/recall/scripts/read_session.py <File-path-from-result>
100```
101
102If results are missing `File:` paths, run `--reindex` to backfill.
103
104## Notes
105
106- Index is stored at `~/.recall.db` (SQLite FTS5, auto-migrated from `~/.claude/recall.db`)
107- Indexes four sources: `~/.claude/projects/` (Claude Code), `~/.codex/sessions/` (Codex), `~/.pi/agent/sessions/` (pi), and `~/.grok/sessions/**/chat_history.jsonl` (Grok)
108- First run indexes all sessions (a few seconds); subsequent runs are incremental
109- Only user and assistant messages are indexed (tool calls, thinking blocks, state snapshots skipped)
110- Results show `[claude]`, `[codex]`, `[pi]`, or `[grok]` tags to indicate the source
111- Dual-table FTS: English queries use Porter stemming, CJK queries use trigram matching
112- Omit the query argument for **list mode** — every session in the window, sorted by recency, no FTS
113- Provide a query for full-text search; both modes accept `--project`, `--days`, `--source`, `--limit`
114- **Upgrading from 0.3.x**: run `--reindex` once to pull in pi sessions
115- **Upgrading from 0.4.x**: run `--reindex` once to pull in Grok sessions
116- **Upgrading from 0.2.x**: run `--reindex` once to build the CJK index