crispy-recall 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +146 -39
- package/dist/SKILL.md.template +28 -237
- package/dist/embed-pending.js +936 -269
- package/dist/push-pending.js +7958 -0
- package/dist/recall.js +7124 -1201
- package/dist/stop-hook.js +825 -134
- package/package.json +11 -5
package/README.md
CHANGED
|
@@ -1,37 +1,103 @@
|
|
|
1
1
|
# crispy-recall
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Let your agents search your past conversations.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Recall lets Claude Code and Codex look up your past conversations, so you can start a new session whenever you want. Close a long chat to save tokens without writing a handoff or worrying about losing what you worked through. Your next session can retrieve just what it needs.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Just ask: “Recall where we left off,” “Recall why we chose this approach,” or even “Recall \<session ID\> and continue.” Your conversations are saved automatically, so your agent can find the relevant discussion or pick up a specific session. Continuing an old, uncached session this way can also save tokens: Recall brings back the conversation without all the background activity that filled the original chat.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Under the hood, Recall indexes the JSONL conversation logs that Claude Code and Codex already generate in a local SQLite database, with vector embeddings generated by the open-source Nomic Embed Text v1.5 model running on your machine. A small skill teaches your agent to retrieve relevant passages using hybrid keyword and semantic search—local RAG over your conversation history, guided by what your agent needs right now.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
[Website](https://recall.thesylvester.ca) · [GitHub](https://github.com/TheSylvester/crispy-recall)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## Quick start (single machine)
|
|
14
|
+
|
|
15
|
+
Use Node.js 24 (or Node.js 22.16+) and install in the environment where you run
|
|
16
|
+
Claude Code. This installs the stable single-machine release:
|
|
14
17
|
|
|
15
18
|
```bash
|
|
16
19
|
npm install -g crispy-recall
|
|
17
20
|
recall install
|
|
18
21
|
```
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
It picks up the conversation history already on your machine, so you can ask it to recall something straight away. The installer sets up the local embedding model, lifecycle hooks, and recall skill for Claude Code, with the same integration for Codex when detected.
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
### More than one machine (experimental)
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
Keep your coding history on one **hub**. Each **satellite** uploads its transcripts
|
|
28
|
+
and searches the hub, without running its own database or embedding model.
|
|
29
|
+
Install Recall under the same account and in the same environment as your coding
|
|
30
|
+
agent. WSL is optional; install separately in Windows and WSL if you use both.
|
|
31
|
+
|
|
32
|
+
Use Node.js 24 and a private network, such as your LAN or Tailscale. Recall does
|
|
33
|
+
not configure Tailscale or SSH; remote access is separate from shared memory.
|
|
34
|
+
|
|
35
|
+
Satellite mode is experimental. On every machine (the hub and each satellite),
|
|
36
|
+
install Recall first:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm install -g crispy-recall
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**On the hub**, initialize Recall, create a token for one satellite, and start
|
|
43
|
+
listening on the hub's private IP:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
recall install
|
|
47
|
+
recall hub token --host laptop
|
|
48
|
+
recall hub serve --bind <hub-private-ip> --port 7877 --detach
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Save the token shown. Use your hub's private IP below even if the generated
|
|
52
|
+
example shows `127.0.0.1`. Give each satellite a different host name; issuing a
|
|
53
|
+
new token for the same name replaces its old token.
|
|
54
|
+
|
|
55
|
+
**On the satellite**, enter that token and connect to the hub. These commands
|
|
56
|
+
read it interactively and pass it through stdin, keeping it out of shell history.
|
|
57
|
+
|
|
58
|
+
Bash:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
read -r -s -p 'Hub token: ' recall_token; printf '\n'
|
|
62
|
+
printf '%s\n' "$recall_token" | recall install --hub http://<hub-private-ip>:7877 --token -
|
|
63
|
+
unset recall_token
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
PowerShell:
|
|
25
67
|
|
|
26
|
-
|
|
68
|
+
```powershell
|
|
69
|
+
$recallToken = Read-Host 'Hub token'
|
|
70
|
+
$recallToken | recall install --hub http://<hub-private-ip>:7877 --token -
|
|
71
|
+
Remove-Variable recallToken
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Installation starts uploading existing transcripts; new turns follow automatically.
|
|
75
|
+
Check the connection and search shared history:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
recall doctor
|
|
79
|
+
recall --all "a conversation from another machine"
|
|
80
|
+
```
|
|
27
81
|
|
|
28
|
-
|
|
82
|
+
Keep the hub running and reachable. `--detach` does not configure startup after
|
|
83
|
+
reboot. On Linux, stop the detached hub before running `recall hub install-service`,
|
|
84
|
+
which starts and enables the systemd service; follow any printed linger instructions.
|
|
85
|
+
Windows and macOS need their own startup configuration. Live platform and reboot
|
|
86
|
+
acceptance for this prerelease is still pending.
|
|
29
87
|
|
|
30
|
-
|
|
88
|
+
Only connect trusted users: satellites upload raw transcripts, and every hub
|
|
89
|
+
token can search the entire hub history. See [Privacy and data](#privacy-and-data).
|
|
90
|
+
|
|
91
|
+
## How to use recall
|
|
92
|
+
|
|
93
|
+
### Ask your agent
|
|
94
|
+
|
|
95
|
+
Ask about what you worked through, or give your agent a session ID and continue from there:
|
|
31
96
|
|
|
32
97
|
| Say this | What your agent can recover |
|
|
33
98
|
|---|---|
|
|
34
99
|
| `Recall where we left off.` | The decisions, unfinished work, and next step from prior sessions. |
|
|
100
|
+
| `Recall why we chose this approach.` | The reasoning and alternatives discussed before the decision. |
|
|
35
101
|
| `Recall — we solved this before.` | The earlier fix, even when your new wording doesn't match the transcript. |
|
|
36
102
|
| `Recall <session-uuid> and continue.` | A UUID-backed conversation in a fresh session, centered on the relevant part. |
|
|
37
103
|
| `Recall why this line exists.` | The session behind a commit or line, including alternatives discussed at the time. |
|
|
@@ -52,7 +118,7 @@ Every result includes a session id and the matched message id. For UUID-based Cl
|
|
|
52
118
|
recall <session-uuid> <message-uuid>
|
|
53
119
|
```
|
|
54
120
|
|
|
55
|
-
Search defaults to the current project's sessions. Expand only when needed:
|
|
121
|
+
Search defaults to the current project's sessions. In 0.4.0, matching repositories share a search scope across clones and worktrees. Expand only when needed:
|
|
56
122
|
|
|
57
123
|
```bash
|
|
58
124
|
recall --all "the decision may have happened in another repo"
|
|
@@ -78,11 +144,9 @@ recall keeps the user and assistant conversation word-for-word. It doesn't repla
|
|
|
78
144
|
|
|
79
145
|
That distinction matters when you need the exact constraint, command, promise, rejected idea, or one-line fix that a summary would reasonably discard.
|
|
80
146
|
|
|
81
|
-
**`/compact` summarizes. recall quotes.**
|
|
82
|
-
|
|
83
147
|
Auto-memory saves what you knew to keep. recall finds what you didn't know you'd need. They complement each other: one keeps selected facts close; the other searches the verbatim conversation record on demand.
|
|
84
148
|
|
|
85
|
-
Tool calls, tool output,
|
|
149
|
+
Tool calls, tool output, hidden thinking, and images are intentionally excluded from the searchable conversation. Tool output is re-runnable; the conversation that interpreted it isn't.
|
|
86
150
|
|
|
87
151
|
### Continue without replaying the session
|
|
88
152
|
|
|
@@ -94,7 +158,7 @@ Recall fe6cc221-2e63-4928-8417-65ec1587d062 and continue the release.
|
|
|
94
158
|
|
|
95
159
|
recall reads the indexed conversation instead of replaying an entire raw transcript. Reads can open on the matched message, paginate forward, and combine context from several past sessions. That means your agent can recover the few facts that matter without pouring every old tool result back into its context window.
|
|
96
160
|
|
|
97
|
-
|
|
161
|
+
The indexed conversation stays available even after its original transcript is deleted. Your agent can also look up related discussions from other sessions as it works.
|
|
98
162
|
|
|
99
163
|
### From a line of code back to the conversation
|
|
100
164
|
|
|
@@ -108,7 +172,7 @@ recall --blame src/foo.ts:42 src/bar.ts:10-20 --limit 20
|
|
|
108
172
|
|
|
109
173
|
Matching is structural: recall compares edits recorded in sessions with commit diffs instead of guessing from timestamps. A commit message summarizes intent; the conversation holds the reasoning, tradeoffs, and rejected alternatives.
|
|
110
174
|
|
|
111
|
-
Commit and blame attribution
|
|
175
|
+
Commit and blame attribution scans local Claude Code edits and Codex `apply_patch` records. It compares recorded changes with git diffs; edits made by arbitrary shell commands may not carry enough structured evidence for attribution.
|
|
112
176
|
|
|
113
177
|
**`git blame` tells you who. `recall --blame` tells you why.**
|
|
114
178
|
|
|
@@ -143,15 +207,15 @@ Claude Code deletes transcripts after 30 days by default. The recall index doesn
|
|
|
143
207
|
|
|
144
208
|
## How it works
|
|
145
209
|
|
|
146
|
-
|
|
210
|
+
On a single machine:
|
|
147
211
|
|
|
148
212
|
1. Stop and SubagentStop hooks index conversation text as turns finish.
|
|
149
|
-
2.
|
|
213
|
+
2. Nomic Embed Text v1.5 generates embeddings locally through llama.cpp.
|
|
150
214
|
3. SQLite stores the text, FTS5 index, vectors, and session metadata in `~/.recall/`.
|
|
151
215
|
4. A small skill teaches your agent to search first when prior work is likely to matter.
|
|
152
216
|
5. Search results enter the context only when the agent asks for them.
|
|
153
217
|
|
|
154
|
-
|
|
218
|
+
On a single machine there's no resident daemon (the optional hub daemon runs only in satellite mode), and recall makes no LLM calls of its own. Indexing and search don't consume model tokens; retrieved text costs context tokens only when your agent reads it, like any other local file.
|
|
155
219
|
|
|
156
220
|
Install-time backfill indexes the Claude Code and Codex sessions still present on disk, so recall is useful on day one rather than only after day one.
|
|
157
221
|
|
|
@@ -159,13 +223,14 @@ Install-time backfill indexes the Claude Code and Codex sessions still present o
|
|
|
159
223
|
|
|
160
224
|
### Requirements
|
|
161
225
|
|
|
162
|
-
- Node.js
|
|
163
|
-
- Claude Code
|
|
164
|
-
- Linux x64/arm64, macOS x64/arm64, or Windows x64
|
|
165
|
-
- macOS 14+ on Apple Silicon or macOS 13.7+ on Intel
|
|
166
|
-
- 500 MB free
|
|
226
|
+
- Node.js 24 recommended; Node.js 22.16+ is also supported for a local install or hub.
|
|
227
|
+
- Claude Code; Codex integration is added when detected.
|
|
228
|
+
- Linux x64/arm64, macOS x64/arm64, or Windows x64.
|
|
229
|
+
- macOS 14+ on Apple Silicon or macOS 13.7+ on Intel.
|
|
230
|
+
- 500 MB free for installation, plus space for database backups when upgrading.
|
|
167
231
|
|
|
168
|
-
|
|
232
|
+
Satellites also support Node.js 20, but installing on Node 20 requires Python,
|
|
233
|
+
make and a C/C++ compiler. Node.js 21 and 23 are unsupported.
|
|
169
234
|
|
|
170
235
|
```bash
|
|
171
236
|
npm install -g crispy-recall
|
|
@@ -188,21 +253,43 @@ Use `recall doctor` if setup reports a problem. Use `recall install --offline` w
|
|
|
188
253
|
|
|
189
254
|
### Upgrading
|
|
190
255
|
|
|
191
|
-
Close active
|
|
256
|
+
Close active coding-agent sessions, upgrade the package, then run `recall install`
|
|
257
|
+
before using Recall again. For a stable release:
|
|
192
258
|
|
|
193
259
|
```bash
|
|
194
260
|
npm install -g crispy-recall
|
|
195
261
|
recall install
|
|
196
262
|
```
|
|
197
263
|
|
|
198
|
-
|
|
199
|
-
|
|
264
|
+
On an existing satellite, upgrade the package and re-run the satellite installer.
|
|
265
|
+
It reuses the saved token for that hub:
|
|
200
266
|
|
|
201
|
-
|
|
267
|
+
```bash
|
|
268
|
+
npm install -g crispy-recall
|
|
269
|
+
recall install --hub http://<hub-private-ip>:7877
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
The installer applies required migrations and keeps rollback snapshots. Allow up
|
|
273
|
+
to three database-sized backups when upgrading from 0.1.x, or two from 0.2.x.
|
|
274
|
+
If the database is busy, close the process using it and retry. Complete migrations
|
|
275
|
+
before searching; semantic results may be incomplete while background embedding
|
|
276
|
+
catches up. Check progress with `recall status` and `recall doctor`.
|
|
277
|
+
|
|
278
|
+
The 0.4.0 upgrade rebuilds Codex message identities from available transcripts.
|
|
279
|
+
Keep the default backfill enabled to recover sessions previously missed by the
|
|
280
|
+
index. Deleted source transcripts cannot be recovered.
|
|
202
281
|
|
|
203
|
-
If
|
|
282
|
+
If an earlier build missed messages or misordered turns, run this on the local
|
|
283
|
+
installation or hub after upgrading:
|
|
204
284
|
|
|
205
|
-
|
|
285
|
+
```bash
|
|
286
|
+
recall repair --messages
|
|
287
|
+
recall backfill --auto-embed
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
This repairs known transcripts without clearing retained history. Avoid
|
|
291
|
+
`recall repair --full` unless you intend to rebuild the index from the transcripts
|
|
292
|
+
still on disk. Do not downgrade to 0.1.6 or earlier after database conversion.
|
|
206
293
|
|
|
207
294
|
## Command reference
|
|
208
295
|
|
|
@@ -213,16 +300,29 @@ Migration works from `recall.db`, not the source transcripts, so indexed history
|
|
|
213
300
|
| `recall <session-id> [<message-id>]` | Read a session, optionally centered on a match. IDs are opaque — full stored IDs or literal prefixes (UUIDs, `agent-<hex>` leaves, `codex-jsonl-*` messages) all resolve. |
|
|
214
301
|
| `recall read <session-ref> [<message-ref>]` | Explicit read for any stored ID shape; a failed read exits nonzero and never falls back to search. |
|
|
215
302
|
| `recall search <terms…>` | Force a search when a term would otherwise look like a session/message ID. |
|
|
216
|
-
| `recall --commit <hash>` | Find Claude Code sessions that produced a commit. |
|
|
217
|
-
| `recall --blame <path>[:line[-line]]` | Trace current code back to its producing
|
|
303
|
+
| `recall --commit <hash>` | Find local Claude Code or Codex sessions that produced a commit. |
|
|
304
|
+
| `recall --blame <path>[:line[-line]]` | Trace current code back to its producing local conversations. |
|
|
218
305
|
| `recall install` | Install or upgrade the hooks, skills, local assets, and history index. |
|
|
219
306
|
| `recall backfill [--auto-embed] [--vendor <v>] [--detach]` | Index session transcripts currently on disk, optionally for one vendor or as a detached job. |
|
|
307
|
+
| `recall backfill --purge-meta [--dry-run]` | Delete machine boilerplate rows indexed before the ingest filter existed; `--dry-run` opens the database read-only and only reports. |
|
|
220
308
|
| `recall status` | Show database size, message counts, embedding gap/migration progress, and active backfill state. |
|
|
221
309
|
| `recall doctor [--integrity]` | Run read-only install and database checks. |
|
|
222
310
|
| `recall repair --fts \| --vectors \| --full` | Rebuild FTS5, clear vectors for re-embedding, or fully reingest on-disk transcripts. |
|
|
311
|
+
| `recall repair --messages` | Re-read known transcripts to recover missed turns, fork history and ordering without clearing the index (hub only). |
|
|
312
|
+
| `recall repair --rekey-codex` | Run the one-time Codex message-id migration to full session UUIDs (hub only). |
|
|
313
|
+
| `recall repair --rekey-projects [--force]` | Fill `project_key` on existing rows; `--force` also re-keys already-keyed rows (hub only). |
|
|
314
|
+
| `recall "<query>" --project-key K` | Scope by an already-derived repo key (`git:`/`origin:`/`path:`), skipping derivation. |
|
|
315
|
+
| `recall hub serve [--bind <addr>] [--port <n>] [--detach]` | Run the hub daemon: mirror satellite transcripts and answer their queries (hub only). |
|
|
316
|
+
| `recall hub token --host <name> \| --revoke <name>` | Issue (or rotate) a satellite's bearer token, or revoke one without a restart (hub only). |
|
|
317
|
+
| `recall hub status [--json]` | Show the daemon, the resolved address, and per-host mirror and push/query state (hub only). |
|
|
318
|
+
| `recall hub install-service` | Register the systemd user unit so the daemon starts at login (hub only). |
|
|
319
|
+
| `recall install --hub <url> --token <t>\|-` | Register this machine as a satellite of that hub; `-` reads the token from stdin (satellite only). |
|
|
320
|
+
| `recall push [--full]` | Push pending transcripts to the hub now; `--full` re-offers every transcript (satellite only). |
|
|
223
321
|
| `recall statusline [--suggest]` | Print the session-id chip or integration guidance. |
|
|
224
322
|
| `recall uninstall [--purge]` | Remove the integration; `--purge` also deletes recall's data. |
|
|
225
323
|
|
|
324
|
+
Date-only `--since` and `--until` bounds cover UTC calendar days; explicit timestamps retain their stated offset. Both text and semantic searches apply these bounds before selecting candidates.
|
|
325
|
+
|
|
226
326
|
Run `recall --help` for the full search and read flag set. Add `--json` to `install`, `uninstall`, `status`, or `doctor` for machine-readable output. Installer options include `--offline`, `--no-backfill`, `--auto-backfill`, `--statusline`, and `--no-statusline`.
|
|
227
327
|
|
|
228
328
|
### Optional statusline
|
|
@@ -235,20 +335,25 @@ It is off by default: accepting the installer defaults, using `--yes` or a non-i
|
|
|
235
335
|
|
|
236
336
|
The installed statusline never opens the database. Its only I/O is one guarded `git status` call with a 400 ms timeout; failure simply drops the git segment, and any segment whose input is missing is omitted. For composition with your own statusline, `recall statusline` prints only the bare, uncolored session-id chip. Uninstall removes the line only if recall still owns it, and doctor reports statusline problems as warnings.
|
|
237
337
|
|
|
238
|
-
> **Warning:** `recall repair --full` is destructive: it replaces the index contents from the transcripts still on disk. If older source transcripts have already been cleaned up, their indexed history cannot be rebuilt. Prefer `--fts` or `--vectors` unless a full reingest is truly necessary.
|
|
338
|
+
> **Warning:** `recall repair --full` is destructive: it replaces the index contents from the transcripts still on disk. If older source transcripts have already been cleaned up, their indexed history cannot be rebuilt. Prefer `--fts` or `--vectors` unless a full reingest is truly necessary. On a hub it also re-ingests the satellite mirror under `~/.recall/remote/`, and it refuses to run when that directory exists but enumerates no hosts — a satellite's history would otherwise be deleted and not rebuilt.
|
|
239
339
|
|
|
240
340
|
## Privacy and data
|
|
241
341
|
|
|
242
342
|
- Your index lives in `~/.recall/recall.db`.
|
|
243
|
-
-
|
|
343
|
+
- On a single machine, search and indexing stay on that machine. In satellite mode the satellite forwards its query text and cwd to your hub and the hub does all indexing (see below).
|
|
244
344
|
- While a query is being embedded, its text is written to a transient file under `~/.recall/run/query-embed/` (mode 0600) and deleted as soon as the embedding completes.
|
|
245
345
|
- There is no telemetry.
|
|
246
346
|
- The database is plain SQLite and inspectable with ordinary SQLite tools.
|
|
247
|
-
-
|
|
347
|
+
- On a single machine, network access is limited to downloading the embedding runtime and model when missing, plus host reachability probes during install and doctor checks. A satellite additionally talks only to the hub URL you configured.
|
|
248
348
|
- `recall uninstall --purge` removes the local store completely.
|
|
249
349
|
|
|
250
350
|
The installed integration is inspectable too: Claude's skill and hook live under `~/.claude/skills/recall/` and `~/.claude/settings.json`. When Codex is detected, recall also uses `~/.codex/skills/recall/` and `~/.codex/hooks.json`.
|
|
251
351
|
|
|
352
|
+
Satellites send raw transcripts and queries to your hub. Recall uses plain HTTP
|
|
353
|
+
without built-in TLS, so keep it on a private network. Each token can search the
|
|
354
|
+
whole hub index and upload only to its named satellite's mirror. Revoke a token
|
|
355
|
+
with `recall hub token --revoke <name>`; no restart is needed.
|
|
356
|
+
|
|
252
357
|
The index deliberately outlives source-transcript cleanup. recall doesn't encrypt `recall.db`; treat `~/.recall/` with the same care as your original Claude Code and Codex histories.
|
|
253
358
|
|
|
254
359
|
## Limitations
|
|
@@ -256,9 +361,11 @@ The index deliberately outlives source-transcript cleanup. recall doesn't encryp
|
|
|
256
361
|
- It isn't automatic fact injection into every prompt. Retrieval is pull-based.
|
|
257
362
|
- It isn't a replacement for documentation, tests, or git.
|
|
258
363
|
- It doesn't claim recalled context is still correct.
|
|
259
|
-
- It doesn't preserve tool output
|
|
364
|
+
- It doesn't preserve tool output, hidden thinking, or images in the searchable conversation.
|
|
260
365
|
- It doesn't yet offer per-session deletion; forgetting is database-level today.
|
|
261
366
|
- Subagent transcripts (Claude Task leaves, Codex child rollouts) are stored durable and readable by explicit ID, but are excluded from default search, lists, and semantic vectors — the parent thread's narration is the canonical memory. There is no search mode that includes them yet.
|
|
367
|
+
- On a satellite, `recall --commit` and `recall --blame` see local sessions only. They read local git and local transcripts, never the hub index.
|
|
368
|
+
- A repo that is keyed `git:<root-commit>` on one machine and `origin:<url>` on another — a shallow clone, for instance — does not unify until both machines agree on the key. Run `git fetch --unshallow`, then `recall repair --rekey-projects --force` on the hub.
|
|
262
369
|
|
|
263
370
|
## Project status
|
|
264
371
|
|
package/dist/SKILL.md.template
CHANGED
|
@@ -10,244 +10,35 @@ when_to_use: >-
|
|
|
10
10
|
Trigger for phrases like "remind me about", "pick up where we left off",
|
|
11
11
|
"continue from last time", or when starting complex work in an area with
|
|
12
12
|
obvious prior sessions. Skip for simple lookups and trivial questions.
|
|
13
|
-
allowed-tools: Bash, Agent, Read
|
|
14
13
|
---
|
|
15
14
|
|
|
16
15
|
# Recall
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
- `[FTS5+SEMANTIC]` — Both keyword and meaning matched. High confidence.
|
|
47
|
-
- `[SEMANTIC-ONLY]` — Found by meaning, not exact words. Vocabulary mismatch discovery.
|
|
48
|
-
- `[FTS5-ONLY]` — Exact keyword match only. May be coincidental.
|
|
49
|
-
|
|
50
|
-
## Sub-agent pattern (recommended for deep research)
|
|
51
|
-
|
|
52
|
-
For questions requiring multiple searches or reading session content, launch a sub-agent.
|
|
53
|
-
The agent prompt **must** include full CLI instructions — sub-agents don't see this skill file.
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
Agent(prompt: "You have a recall CLI for searching and reading past session transcripts.
|
|
57
|
-
Use ONLY `$RECALL_BIN` for all transcript access — do NOT read .jsonl files directly,
|
|
58
|
-
do NOT use Grep/Glob/find to locate transcripts.
|
|
59
|
-
|
|
60
|
-
CLI usage:
|
|
61
|
-
$RECALL_BIN \"query\" Search (returns session IDs + matched message IDs)
|
|
62
|
-
$RECALL_BIN <session-id> <message-id> Read centered on matched message (use this after search)
|
|
63
|
-
$RECALL_BIN <session-id> Read from beginning (only when you need full arc)
|
|
64
|
-
$RECALL_BIN <session-id> --offset N Continue reading from offset N (shown in output footer)
|
|
65
|
-
$RECALL_BIN read <session-ref> [<message-ref>] Explicit read for any stored ID (opaque; exits
|
|
66
|
-
nonzero on failure — never falls back to search)
|
|
67
|
-
$RECALL_BIN search <terms...> Force a search when a term looks like an ID
|
|
68
|
-
$RECALL_BIN --list --since YYYY-MM-DD List recent sessions
|
|
69
|
-
$RECALL_BIN --help Full flag reference
|
|
70
|
-
|
|
71
|
-
Session/message IDs are OPAQUE strings (UUIDs, agent-<hex> subagent leaves,
|
|
72
|
-
codex-jsonl-* message ids). Paste them back exactly as displayed — full ID or
|
|
73
|
-
a literal prefix both resolve.
|
|
74
|
-
|
|
75
|
-
DATE HANDLING: Any date the user mentions MUST become a flag — never search text:
|
|
76
|
-
--since YYYY-MM-DD Only sessions on or after this date
|
|
77
|
-
--until YYYY-MM-DD Only sessions on or before this date (inclusive)
|
|
78
|
-
--recent Boost recent sessions (use when user says 'recently', 'latest')
|
|
79
|
-
Example: \"what happened April 10\" → $RECALL_BIN --list --since 2026-04-10 --until 2026-04-10
|
|
80
|
-
|
|
81
|
-
PROJECT SCOPING: search and list default to the CURRENT directory's project.
|
|
82
|
-
--all Search across ALL projects (use when the answer may live
|
|
83
|
-
in another repo, or when a scoped search returns little)
|
|
84
|
-
--project PATH Scope to a specific project path instead of the CWD
|
|
85
|
-
If results look thin or empty, retry with --all before concluding nothing exists.
|
|
86
|
-
|
|
87
|
-
CRITICAL READING RULE: After searching, ALWAYS read the matched message:
|
|
88
|
-
$RECALL_BIN <session-id> <message-id>
|
|
89
|
-
This auto-centers on the match and shows surrounding turns. The output
|
|
90
|
-
footer shows the --offset to continue reading forward. NEVER read sessions
|
|
91
|
-
from the beginning after a search — the match is already found for you.
|
|
92
|
-
|
|
93
|
-
Task: [describe what to find]. Run these searches: [list queries].
|
|
94
|
-
Search EXHAUSTIVELY — do not stop after the first promising result. Run all
|
|
95
|
-
listed queries, read into multiple results, and only report findings after
|
|
96
|
-
you have checked every search path. Cross-reference results and summarize.",
|
|
97
|
-
mode: "auto")
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## Other reading modes
|
|
101
|
-
|
|
102
|
-
| Mode | Command | When to use |
|
|
103
|
-
|------|---------|-------------|
|
|
104
|
-
| **Matched message** | `$RECALL_BIN <id> <msg-id>` | **Always use this after search** — auto-centers on match |
|
|
105
|
-
| Full session | `$RECALL_BIN <id>` | Only when you need the overall arc, not a specific answer |
|
|
106
|
-
| Continue | `$RECALL_BIN <id> --offset N` | Continue from where the last read left off |
|
|
107
|
-
| Newest first | `$RECALL_BIN <id> --reverse` | Looking for recent content in a long session |
|
|
108
|
-
|
|
109
|
-
## Commit attribution (`--commit` / `--blame`)
|
|
110
|
-
|
|
111
|
-
Find the session(s) that produced a given commit, or the session(s)
|
|
112
|
-
responsible for specific code in a file. Matches by structurally comparing
|
|
113
|
-
session Edit/Write/MultiEdit tool calls against the commit's diff (tri-gram
|
|
114
|
-
intersection), not by clock proximity. Results include both top-level
|
|
115
|
-
sessions and Task-tool subagent leaves (`agent-<hash>`) with
|
|
116
|
-
`parent_session_id` set.
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
# Sessions that produced one commit
|
|
120
|
-
$RECALL_BIN --commit 864f569
|
|
121
|
-
$RECALL_BIN --commit 864f569 --raw # full JSON
|
|
122
|
-
|
|
123
|
-
# Sessions responsible for a file (HEAD-relative blame)
|
|
124
|
-
$RECALL_BIN --blame src/webview/components/FlexAppLayout.tsx
|
|
125
|
-
|
|
126
|
-
# Sessions responsible for one line — narrowest, most precise lookup
|
|
127
|
-
$RECALL_BIN --blame src/foo.ts:42
|
|
128
|
-
|
|
129
|
-
# Sessions responsible for a line range
|
|
130
|
-
$RECALL_BIN --blame src/foo.ts:42-100
|
|
131
|
-
|
|
132
|
-
# Multiple specs in one query (unioned)
|
|
133
|
-
$RECALL_BIN --blame src/foo.ts:42 src/bar.ts:10-20 --limit 20
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
`--blame` is HEAD-relative: it runs `git blame` to find the commits
|
|
137
|
-
responsible for the current state of the file (or line range) and
|
|
138
|
-
attributes each. Sessions whose work was overwritten by a later commit
|
|
139
|
-
won't appear — for the full historical iteration set, use `git log` and
|
|
140
|
-
pass each commit to `--commit` separately.
|
|
141
|
-
|
|
142
|
-
### When to use
|
|
143
|
-
|
|
144
|
-
- **"Who produced this commit?"** — `--commit <hash>`. Returns the session(s)
|
|
145
|
-
that typed the edits. Multiple matches mean nested/sequential work.
|
|
146
|
-
- **"Why is this line / block of code here?"** — `--blame <path>:<line>`
|
|
147
|
-
or `--blame <path>:<L1>-<L2>`. The narrowest, most precise lookup —
|
|
148
|
-
go straight to the session that authored the line you're staring at.
|
|
149
|
-
- **"What sessions are responsible for this file's current state?"** —
|
|
150
|
-
`--blame <path>` (no line). Returns one row per (commit, session) for
|
|
151
|
-
every commit whose lines still live in HEAD.
|
|
152
|
-
- **"Why is this code shaped this way?"** — When refactoring, debugging a
|
|
153
|
-
regression, or reviewing a legacy pattern, look up the originating session
|
|
154
|
-
before reasoning from the code alone. The session usually has rejected
|
|
155
|
-
approaches and constraints that the final code does not.
|
|
156
|
-
|
|
157
|
-
### Reading the results
|
|
158
|
-
|
|
159
|
-
Sessions are listed chronologically (oldest first). **The most recent is
|
|
160
|
-
usually the load-bearing one for current code; earlier sessions show
|
|
161
|
-
evolution.** Each row exposes:
|
|
162
|
-
|
|
163
|
-
- `session` — top-level UUID or `agent-<hash>` subagent leaf
|
|
164
|
-
- `parent_session_id` — set when the match is a subagent; follow this to
|
|
165
|
-
reach the parent's rationale conversation
|
|
166
|
-
- `content_hits` — tri-gram intersections with the commit's added lines
|
|
167
|
-
- `surviving_in_commit` / `surviving_ratio` — how much of the session's
|
|
168
|
-
work made it into the commit's final state (low ratio = iterated heavily
|
|
169
|
-
or was partly overwritten by a later session)
|
|
170
|
-
- `matched_files` — commit-touched files this session edited in window
|
|
171
|
-
- `last_edit_at` — ISO timestamp used for chronological sort
|
|
172
|
-
|
|
173
|
-
Once you have a session ID, pass it back into recall to read the conversation:
|
|
174
|
-
|
|
175
|
-
```bash
|
|
176
|
-
$RECALL_BIN <session-id> # full session, oldest first
|
|
177
|
-
$RECALL_BIN <session-id> --reverse # newest first (faster for recent context)
|
|
178
|
-
$RECALL_BIN "rationale keyword" --since DATE # search within window
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
**For in-progress sessions**, the Stop hook that indexes a session hasn't
|
|
182
|
-
fired yet — wait a few seconds after the turn finishes, then search again.
|
|
183
|
-
|
|
184
|
-
## Date handling
|
|
185
|
-
|
|
186
|
-
**Any date or time indication from the user MUST be translated into date flags.**
|
|
187
|
-
Do NOT put dates into the search query text — dates in FTS5 produce false matches.
|
|
188
|
-
|
|
189
|
-
```bash
|
|
190
|
-
# Single day — use --since and --until together
|
|
191
|
-
$RECALL_BIN --list --since 2026-04-10 --until 2026-04-10
|
|
192
|
-
$RECALL_BIN "scroll bug" --since 2026-04-10 --until 2026-04-10
|
|
193
|
-
|
|
194
|
-
# Open range — just one flag
|
|
195
|
-
$RECALL_BIN "recall improvements" --since 2026-04-01
|
|
196
|
-
$RECALL_BIN "old bug" --until 2026-03-15
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
- `--since DATE` — only sessions on or after this date
|
|
200
|
-
- `--until DATE` — only sessions on or before this date (inclusive of the day)
|
|
201
|
-
- Both accept ISO-8601 dates (YYYY-MM-DD)
|
|
202
|
-
- Both work in search and list modes
|
|
203
|
-
|
|
204
|
-
**Example:** "What did we work on April 10?" →
|
|
205
|
-
`$RECALL_BIN --list --since 2026-04-10 --until 2026-04-10` to find all sessions,
|
|
206
|
-
then search with topic keywords + date flags if needed.
|
|
207
|
-
|
|
208
|
-
## Project scope
|
|
209
|
-
|
|
210
|
-
**Search and list default to the current working directory's project.** Recall
|
|
211
|
-
filters results to the project whose path is your CWD — so from inside one repo
|
|
212
|
-
you only see that repo's sessions. This keeps everyday recall focused, but it
|
|
213
|
-
silently hides history when the answer lives elsewhere.
|
|
214
|
-
|
|
215
|
-
```bash
|
|
216
|
-
# Default — scoped to the CWD's project
|
|
217
|
-
$RECALL_BIN "auth refactor"
|
|
218
|
-
|
|
219
|
-
# Search every project (cross-repo questions, or when a scoped search is thin)
|
|
220
|
-
$RECALL_BIN "auth refactor" --all
|
|
221
|
-
|
|
222
|
-
# Scope to a specific project regardless of CWD
|
|
223
|
-
$RECALL_BIN "auth refactor" --project /home/me/dev/other-repo
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
- `--all` — disable scoping; search across all indexed projects
|
|
227
|
-
- `--project PATH` — scope to an explicit project path instead of the CWD
|
|
228
|
-
- Both work in search and list modes
|
|
229
|
-
|
|
230
|
-
**When to reach for `--all`:** the user asks about work that may span repos, the
|
|
231
|
-
question isn't tied to the current repo, or a default (scoped) search returns
|
|
232
|
-
few/zero results. A thin scoped result is often just the scope — retry with
|
|
233
|
-
`--all` before concluding the history doesn't exist.
|
|
234
|
-
|
|
235
|
-
## Recency boost
|
|
236
|
-
|
|
237
|
-
When the user says "recently", "latest", "last few days", or otherwise indicates
|
|
238
|
-
they want recent results, add `--recent` to strongly boost newer sessions:
|
|
239
|
-
|
|
240
|
-
```bash
|
|
241
|
-
$RECALL_BIN "scroll bug fix" --recent
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
This increases the recency decay from ~50% penalty at 50 days to ~50% at 10 days,
|
|
245
|
-
pushing recent sessions to the top of results. Combine with `--since` for best results.
|
|
246
|
-
|
|
247
|
-
## Tips
|
|
248
|
-
|
|
249
|
-
- **Search is cheap, reading is expensive.** Run 3-5 varied queries before committing to reading sessions.
|
|
250
|
-
- **Message IDs are stable.** You can reference them across searches.
|
|
251
|
-
- **Use `--since` / `--until` to scope.** Both search and list modes accept date flags.
|
|
252
|
-
- **Search is scoped to the CWD's project by default.** Add `--all` for cross-repo questions or when a scoped search comes back thin.
|
|
253
|
-
- **Raw JSON output** (`--raw`) is available for programmatic processing.
|
|
17
|
+
Search + read past Claude Code / Codex session transcripts. Command: `recall`
|
|
18
|
+
(fallback: `$RECALL_BIN`).
|
|
19
|
+
|
|
20
|
+
**Pattern: search → read the match.** `recall "query"` returns rows with session ID +
|
|
21
|
+
matched message ID; then `recall <session-id> <message-id>` reads centered on that match
|
|
22
|
+
(footer shows `--offset` to continue). Don't re-read sessions from the top.
|
|
23
|
+
|
|
24
|
+
- Dates go in flags, never query text: `--since`/`--until YYYY-MM-DD`; `--recent` for "lately".
|
|
25
|
+
- Search is scoped to this repo (any clone or worktree); thin or off-target results → retry with `--all`
|
|
26
|
+
(or `--project PATH`). Semantic fill returns plausible rows for ANY query — judge
|
|
27
|
+
relevance yourself.
|
|
28
|
+
- A read's header says `Session:`. If it says `Query:`, the ref fell back to search
|
|
29
|
+
and the rows are noise — fix the ID; `recall read <ref>` exits nonzero instead of
|
|
30
|
+
falling back.
|
|
31
|
+
- Transcripts record what was believed, not what is — verify claimed state against
|
|
32
|
+
git/disk before repeating it.
|
|
33
|
+
- `recall --commit <hash>` / `recall --blame path:line` → the sessions that produced a
|
|
34
|
+
commit / the code at HEAD (structural match, includes rationale + rejected approaches) (local sessions only on a satellite).
|
|
35
|
+
- `recall --list --since D --until D` browses a day. IDs are opaque; paste back exactly.
|
|
36
|
+
- Just-finished sessions index a few seconds after the turn ends; on a
|
|
37
|
+
satellite, after the push lands (seconds).
|
|
38
|
+
- `recall --help` for everything else.
|
|
39
|
+
|
|
40
|
+
**Deep research → sub-agent.** For multi-search timelines, delegate. The sub-agent can't
|
|
41
|
+
see this file, so its prompt must say: use only the `recall` CLI (never Grep/Read .jsonl
|
|
42
|
+
transcripts); run `recall --help` first; search then read matched messages
|
|
43
|
+
(`recall <session-id> <message-id>`); dates as `--since`/`--until` flags; `--all` if
|
|
44
|
+
results are thin; search exhaustively and cross-reference before reporting.
|