Skip to content
Get AI Business OS

Searching Your History

PRIMA Memory

You search your history by asking Claude a question. Claude turns the question into a call to the search_history tool, chooses the settings, and reads the results back to you. This page explains those settings, so you know what to ask for and how to read what comes back.

Plain questions are enough. These examples show the kind of request that works and the setting Claude is likely to use for each.

You ask What Claude searches
“What did we work on yesterday?” Your history with the time filter yesterday
“Find where we talked about the venue for the Spring Workshop” Your history for “venue”, by keyword and meaning
“Which sessions changed agenda.md?” The file history for agenda.md
“Search for P012 in the last 10 days” Your history for “P012” with the time filter 10 days ago
“Do a deep search for the supplier comparison” Your history and the session extracts for “supplier comparison”

PRIMA Memory looks at your most recent work first, because that is what you most often want. Without a time filter, a search runs through these steps and stops at the first one with a relevant match.

  1. Your conversations from the last 7 days, then the last 30 days, then your whole history.
  2. This month’s session history in your project register, with the summaries that /save and /night write.
  3. The monthly archive in .claude/state/history/, newest month first, until one month gives a match.

A match is relevant when a keyword is found or a passage passes the semantic threshold. Each reply names the steps it searched, so you can see how far back it went. Steps 2 and 3 need the session history that PRIMA Project Management and AI Business OS keep. A workspace without a project register skips them.

A time filter you give is searched on its own and never widened. That window also limits the session history entries. Session history matches appear under a Session History Summaries heading, with the date, project and summary of each entry. Each entry is a one or two sentence summary, and it may be the only record of work from before your conversation files begin.

Mode How it matches Use it for
both (the default) Runs keyword and semantic search and merges the results Most questions
keyword Matches the exact words you give Project IDs, file names, names of people or products, and any search when the semantic index is still building
semantic Matches by meaning Questions where you remember the idea but not the words used

A keyword search never loads the embedding model and never updates the index, so it is the quickest mode and works offline. How Indexing Works explains how each mode scores its results.

A time filter keeps the sessions that started inside a window. PRIMA Memory applies the same window to keyword results, semantic results and the extracts in a deep search.

Filter Window
today From midnight today
yesterday From midnight yesterday to midnight today
this week From midnight on the most recent Sunday
last week The seven days before the most recent Sunday
this month From the first day of this month
last month The whole of the previous calendar month
N days ago, such as 3 days ago The last N days counted back from now
N weeks ago, such as 2 weeks ago The last N weeks counted back from now

PRIMA Memory uses your computer’s local time and starts each week on Sunday. It ignores a filter it does not recognise and searches your whole history instead.

In a standard install PRIMA Memory already limits Claude Code conversations to the current workspace, so you seldom need the project_path setting. To focus on one project, the simplest route is to put the project ID or name in the question, such as “search for P012”.

When Claude does pass project_path, each source treats it differently.

Source What project_path keeps
Claude Code conversations All of them when the value is the workspace’s full path, its folder name, or another value that ends in the same words as the workspace path. None for any other value
Shared project log The entries in the folder whose name matches the value, such as P012, and none when the value is a path
VS Code Copilot Chat All of them, because these sessions record no folder
Codex Sessions whose recorded folder path contains the value, or is contained in it, plus sessions that recorded no folder
Session extracts in a deep search The extract folder named after the value’s last folder name, in lower case, with spaces turned into hyphens and other punctuation removed

A deep search also looks through the session extracts in .prima-memory/extracts/. Ask Claude for a “deep search”, or for “everything we have on” a subject, and it sets deep to true.

The deep search reads markdown files named in the pattern YYYY-MM-DD-HHMM-description.md in each project folder under extracts/, which covers every session extract PRIMA Memory writes. It scores each file on its name and contents.

Signal Points
File name contains your whole query 20
Each query word found in the description part of the file name 15
Each query word found in the file’s text 3
File dated in the last seven days Up to 5

Extract matches appear after the session results under an Agent Outputs heading, with the file path, project folder, time and a short preview. If no session matches but an extract does, the reply shows the extract matches on their own.

Each result starts with the session title, a relevance score and a label for the source. Below that come the session ID, the start time, the project folder, the git branch, any tags, the names of changed files and up to two short passages. The passages are the first 150 characters of up to two replies from Claude that contain your whole query.

Found 2 session(s) matching your query (mode: both). Searched the last 7 days.
## Spring Workshop venue shortlist (relevance: 96) [transcript]
Session: 5b1e7c2a-0d4f-4e8b-9a61-2c7f3e9d1a40
Time: 07/10/2026, 14:05:12
Project: /Users/you/Example Consulting
Branch: main
Tags: feature
Files changed: venue-shortlist.md
Relevant context:
"The venue shortlist now has three options, and the second has the breakout rooms you asked for..."
## Venue deposit paid for P012 (relevance: 41) [shared log · sam]
Session: P012/20261006T091244Z-sam-a1b2c3
Time: 06/10/2026, 10:12:44
Project: P012
Branch: unknown
Tags: project:P012, author:sam
Label Source
[transcript] A Claude Code conversation in this workspace
[shared log · author] An entry in the shared project log, with the author’s name
[VS Code] A VS Code Copilot Chat session
[Codex] A Codex session

Use the session ID with get_session_details to open a Claude Code conversation or a shared log entry. VS Code and Codex results cannot be opened that way.

PRIMA Memory warns you whenever the results may be incomplete, so that a gap in the index never looks like a real absence of matches. Each warning line starts with ⚠.

Warning begins What it means What to do
N of M session files are not yet in the semantic index Some conversations are only searchable by keyword so far Run rebuild_index, or keep searching and the index catches up
Index rebuild in progress A rebuild is running and older sessions are keyword-only until it finishes Wait, or check progress with get_index_status
N exchange(s) failed to embed during sync Some text could not go into the index during the update before the search See Troubleshooting
Semantic search failed (...) — results below are keyword-only The semantic part did not run, often because the model could not load See Troubleshooting
  • get_recent_sessions lists your latest Claude Code sessions in this workspace, newest first.
  • get_file_history shows every recorded change to one file, with the explanation Claude gave each time.
  • summarise_period totals a day, week or month of work, with projects, files and common topics.

The Tools Reference gives the settings and output of each.