Skip to main content
skill CX Codex

recall · arjunkmrm — Claude Code skill: search past agent sessions

Full-text search across past Claude Code, Codex, pi and Grok sessions with BM25 ranking. Useful when you need to remember what you already discussed with an agent.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add arjunkmrm/recall --skill recall -a claude-code
npx skills add arjunkmrm/recall --skill arjunkmrm-recall -a claude-code
Open on GitHub

What recall does

The skill indexes four sources: ~/.claude/projects/ for Claude Code, ~/.codex/sessions/ for Codex, ~/.pi/agent/sessions/ for pi, and ~/.grok/sessions/**/chat_history.jsonl for Grok. Only user and assistant messages make it into the index — tool calls, thinking blocks and state snapshots are skipped. The database lives at ~/.recall.db on SQLite FTS5.

Queries follow FTS5 syntax: exact phrases in quotes, AND, OR, NOT, and prefix matching with an asterisk. Japanese, Chinese and Korean text falls back to trigram matching, English uses Porter stemming. You can also skip the query entirely and get a plain list of sessions in the window, sorted by recency.

The first run indexes everything in a few seconds; later runs are incremental. Upgrading from 0.3.x, 0.4.x or 0.2.x means running --reindex once, otherwise the newer sources and the CJK index stay missing. Python 3 is required — the script runs as python3 ~/.claude/skills/recall/scripts/recall.py.

What it helps with

  • recall which approach you settled on last session
  • list sessions for one project within a date window
  • narrow history down to Codex or pi only
  • read the raw transcript of a matched session
  • resume a session with --resume or --session

Example prompts for the agent

  • search my past sessions for what we discussed about bufferStore
  • list every pi session from the last week
  • find the exact phrase "ACP protocol" in my Claude Code history

How to install recall

1Skills CLI (Vercel)

npx skills add arjunkmrm/recall --skill recall -a claude-code
npx skills add arjunkmrm/recall --skill arjunkmrm-recall -a claude-code

2Manually: put the files in place

~/.claude/skills/arjunkmrm-recall/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/arjunkmrm-recall/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about recall

How do I install recall in Claude Code?

Run npx skills add arjunkmrm/recall --skill recall -a claude-code, then npx skills add arjunkmrm/recall --skill arjunkmrm-recall -a claude-code. The skill file lands at ~/.claude/skills/arjunkmrm-recall/SKILL.md.

What does recall do?

It searches past Claude Code, Codex, pi and Grok sessions using full-text search with BM25 ranking. Results carry [claude], [codex], [pi] or [grok] tags.

How does English search differ from CJK?

The index has two tables: English queries go through Porter stemming, while Japanese, Chinese and Korean text uses trigram matching.

Source text

SKILL.md · MIT
---
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

© arjunkmrm · MIT · arjunkmrm/recall

Similar skills

All skills for Agent setup: memory, context, orchestration →

recall by other authors comes first.

recall rohitg00 Searches past observations, sessions, and learnings through agentmemory. Use it to recover context when you need to know what a project already covered. CX Codex +1 13,900installs recall backnotprop Rebuilds a short brief from your chat transcripts, the live repo state and the shared record: where things stand and what to do next. CX Codex +1 5,000installs recall michael-denyer Rebuilds your recent working context from chat history, live repo state and the shared project record, then hands back a short brief on where things stand. CX Codex +1 833installs recall parcadei Pulls learnings from past sessions out of the memory system: patterns, errors, installs. Useful when the agent retraces ground you already covered. CX Codex +1 493installs recall entireio Finds previous work sessions via the Entire CLI and turns the closest checkpoint into an actionable playbook. CX Codex +1 404installs pp-slack Matt Van Horn This skill mirrors your Slack history into a local SQLite database with full-text search, so old messages stay reachable after Slack's retention window closes. CX Codex +1 373installs pp-hackernews Trevin Chow Lets your agent read Hacker News with a local SQLite store and snapshot history. Useful for daily front-page diffs and topic trend checks. CX Codex +1 993installs session-history rohitg00 Shows recent project sessions as a clean timeline. Use it to recover past decisions, observations, and session status. CX Codex +1 13,900installs claude-history-ingest Ar9av Distills past Claude Code sessions into structured Obsidian wiki notes. Useful for preserving project context and mining technical takeaways from chat logs. CX Codex +1 3,000installs codex-history-ingest Ar9av Mines your Claude CLI session logs and turns them into Obsidian wiki pages. Useful once rollout files pile up and the decisions inside them are hard to find. CX Codex +1 2,600installs session-to-skill entireio Turns Entire sessions and checkpoints into a skill draft: it pulls out the workflow you repeat and writes it as future agent behavior. CX Codex +1 426installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor