Search past Claude Code sessions
search_sessionsFind past conversations from any Claude Code project by searching keywords in titles, first messages, or project paths. Returns matching session IDs for quick retrieval.
Instructions
Search your past Claude Code conversations (across all projects) by keyword — matches session titles, first messages, and project paths. Use when the user refers to a past conversation by topic (e.g. 'the session where we set up the license system'). Returns matching sessions with their ids.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "search_sessions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Keyword(s) to search for in titles / first messages / project paths. | |
| limit | No | Max results (default 20). |