search
Search past Claude Code sessions by text query to find conversation matches with context and branch details. Filter by project and include subagent sessions for thorough retrieval.
Instructions
Full-text search across Claude Code session history.
Searches conversation text (user and assistant messages) with fork awareness. Returns matches with surrounding conversational context and branch info.
Args: query: Search text (case-insensitive substring match). project: Project slug to filter by. Empty for all projects. max_results: Maximum results (default 10, max 50). include_subagents: Also search subagent session files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| project | No | ||
| max_results | No | ||
| include_subagents | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |