How Miguel Ríos Berríos Built Recall to Search Past Agent Sessions
Built by Miguel Ríos Berríos · · Source: X
Result: According to Miguel, in the first week of tuning, search went from 20 seconds at the 95th percentile to 1.4, and the right session landed in the top 20 for 88% of questions, up from 54%.
What they built
Miguel Ríos Berríos built Recall, a skill that lets a coding agent search old Claude Code and Codex sessions and bring back the context on a topic. They say it started because they wanted one coding session to remember what another one did. It grew into a hosted service the whole team uses every day, and Miguel calls it their company brain. The skill is open source in the Parcha-ai/parcha-skills repo on GitHub.
How it works
According to Miguel, Recall grew in stages:
- A prompt. In April it was a SKILL.md telling the agent where Claude Code keeps its transcripts and how to grep them.
- Scripts. A few Python scripts ranked sessions and pulled out prompts, but every search read every transcript. By July there were more than 5,000 transcripts, about 5 GB.
- A local index. Miguel pointed an agent at Garry Tan's gbrain and asked for something like it. In one night Recall became a single recall.py on top of a SQLite full-text index that reads both Claude Code and Codex sessions.
- A hosted service. A collector on every machine sends sessions to an ingest service that redacts secrets. Object storage keeps every session as it arrived. From that, the system builds a Turbopuffer search index, Parquet files for broad questions and a small Postgres catalog that controls who can see what. An Archil sandbox mounts the data read-only with no network and runs DuckDB, ripgrep and Python.
Agents reach it through four MCP tools: search, scope, scan and exec. Every result comes with a receipt pointing to the exact session record. Miguel says an early version had its own agent inside the service, and they removed it because the calling agent already does that work well and the extra agent hid the evidence. They also say agents wrote most of the code while they focused on the architecture.
The team uses it to ask what someone worked on this week, to find everything about a past project, to write handoff docs with a footnote on every claim, and to track how their use of Claude Code and Codex changes over time.
The result
Miguel reports these numbers:
- The local index found the right session in the top five 63% of the time on a set of 57 questions, up from 23%, with searches taking 0.16 seconds instead of 15.7.
- In the first week of a daily scorecard, search went from 20 seconds at the 95th percentile to 1.4, and the right session landed in the top 20 for 88% of questions, up from 54%.
- A question about one person over one day went from 40 seconds to about 0.15 once the Parquet files existed.
Their target is the right session in the top five at least 90% of the time, with search under two seconds.
How to build something similar
These are our suggestions, not Miguel's instructions:
- Start small. Write a markdown skill that tells your agent where your session transcripts live and how to search them.
- When plain grep gets slow, put a full-text index in front of the transcripts. SQLite is enough for one machine.
- Keep the raw transcripts untouched and treat every index as something you can rebuild from them.
- Write a fixed list of test questions with known answers, and measure accuracy and speed before and after each change.
The original post
https://x.com/i/article/2118054956880244736 Recall, the skill we use for retrieving context from Claude Code and Codex sessions is open source here: https://github.com/Parcha-ai/parcha-skills. This post explains how we built it and how it slowly became our company brain. Recall started because I wanted one coding session to remember what another one did. I'd ask an agent "remember when I did X? put all the details down so we can keep working," and it would search my old Claude Code and Codex sessions and hand back a compacted context about that topic. It was a simple way to resume a session I'd lost the thread on, or to fix a bug in a system I hadn't touched in weeks. As the team grew, I gave it to everyone. When someone new joins, I tell them that if they have a question, they should start with recall. We use it every day to get context on technical decisions we made, to hand work from one person to another, and to look at trends in how we use coding agents and how the harnesses behave over time. It started as a prompt A lot of our skills follow the same path. They start as a markdown file, pick up a few scripts, and some of them grow into a system we end up hosting and running, which is where recall ended up. In April it was just a prompt, a SKILL.md that told the agent where Claude Code keeps its transcripts (one JSONL file per session under ~/.claude/projects) and how to grep them, read the matches and write down what it found. All of my sessions lived on one cloud machine, so that was all it needed. Then we gave it a few scripts so the agent didn't have to improvise every search: find_sessions.py ranked sessions by matching prompts, extract_user_prompts.py pulled out what I had asked, and dump_turn_context.py showed the window around a match. They worked, but each search read every transcript on disk. By July there were more than 5,000 Claude Code transcripts on that machine, about 5 GB, plus Codex sessions the scripts couldn't read at all. The agents had gone back to grepping by hand about nine times for every time they used the scripts. So I pointed an agent at @garrytan gbrain and asked it to build us something like it. In one night recall became a local index, a single recall.py with search, show and related on top of a SQLite full-text index. It also kept an entity table for PR numbers, file paths and job IDs, and it could read both Claude Code and Codex sessions. On a frozen set of 57 questions, the right session showed up in the top five 63% of the time, up from 23%, and searches came back in 0.16 seconds instead of 15.7. That worked while everything lived on one machine. Then I wanted my laptop's sessions in it too (Codex, Claude Code, ChatGPT and Cowork), and after that my team's. Three things were missing: A place to store every transcript. An ingest service, with a collector on every machine sending sessions to it. A way for the agents on every machine to ask that service questions, which is what MCP is for. The first version of that service had a recall agent inside it. Your agent asked the recall agent, and it searched and answered. We took it out once we realized the agent calling recall is already Claude Code or Codex, running a frontier model, and it's very good at pulling evidence into files, running its own searches and summarizing. A second agent in the middle repeated that work and hid the evidence. What the calling agent needed was good tools for recall and fast retrieval, so that's where the rest of the work went. Why it's called recall The name is the design, since recall's job is to make sure the agent doesn't miss anything, and precision is up to the agent. I wrote it down for the agents building it: "focus on recall so much. Make sure that you have everything... the serverless execution and all the grep should focus on precision." Every tool returns pointers to where the answer could be, with a receipt for each piece of evidence, and the agent opens the exact session before it cites anyt
Want to build something like this?
Join the Shipping Skool community free. Paid members get live bootcamp calls every week.
Join Shipping Skool — FreeMore use cases
- How Andrej Karpathy Built HackerTube with Claude Code and Opus 5.5Developer
- How Adonias Built a CRM in Claude Code with Opus 5.5 and 6 SubagentsDeveloper
- How Kieran Klaassen Built a Webcam Heart Rate App with Gemini 4 ArgonDeveloper
- How Federico Viticci Used Opus 5.5 to Trim His Open Minis PromptsDeveloper