Search Pi sessions
pi_session_searchSearch past Pi coding-agent session transcripts by literal text or exact phrase to recall prior conversations. Scope results to a project or all projects.
Instructions
Literal case-insensitive search across primary Pi session histories; complete session UUIDs are also recognized, though pi_session_find is the more direct lookup. Defaults to the configured scope and visible conversation content; use scope all only for explicit cross-project recall.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Use conversation for visible user/assistant history (default); use raw only when internal records are explicitly required. | conversation |
| limit | No | Maximum number of matching sessions to return, from 1 to 25. | |
| query | Yes | One literal token or exact phrase, from 1 to 4000 characters. | |
| scope | No | Search primary sessions from the configured active project by default; use all only for an explicit cross-project search. Nested subagent/artifact sessions are excluded. | project |
| cursor | No | Omit for the first page. Legacy first-page values '/' and 'start' are accepted. For later pages, pass only the next_cursor returned by the preceding call unchanged. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| scope | Yes | ||
| matches | Yes | ||
| has_more | Yes | ||
| next_action | No | ||
| next_cursor | No | ||
| scanned_sessions | Yes |