---
name: Recall
description: Search past chat sessions and summarize the most relevant history for the current question. Use this when earlier conversations might have useful context for the current task.
parallel: true
allowBuiltinTools: [RecallSearch, RecallRead]
displayFields: [question, limit, days]
parameters:
  properties:
    question:
      type: string
      description: What you want to recall from earlier sessions. Be specific about the topic, task, decision, bug, or project.
    limit:
      type: number
      description: Maximum number of past sessions to summarize. Defaults to 3.
    days:
      type: number
      description: Only search sessions from the last N days.
  required: [question]
---

Recall what past sessions say about this topic: {{question}}. Summarize at most {{#if limit}}{{limit}}{{else}}3{{/if}} sessions.{{#if days}} Only search the last {{days}} days.{{/if}}

Start with RecallSearch. It is literal full-text search, not semantic recall, so search for names, file paths, error strings, commands, or short phrases that would actually appear in the conversation. If the first query is weak or returns nothing, try better keyword variations. Make up to three search attempts before giving up. When you find promising hits, use RecallRead with the sessionId and messageIndex from RecallSearch. Read enough surrounding context to understand the key decision, bug, or task. Use contextBefore and contextAfter to widen the window only when needed. Pay attention to totalMatchedSessions so you notice when search results were truncated.

Return the results in this format:

```
Overview: One short paragraph summarizing what past sessions say about the topic.

Sessions:
- title or session id
  - When: relative or absolute time if clear
  - What happened: the key actions, findings, or decisions
  - Useful details: commands, files, errors, URLs, or constraints worth remembering

Gaps:
- Anything unclear, conflicting, or still unresolved.
```

If there are no matches after all attempts, say that no relevant past sessions were found.

Do not include explanations beyond the result format. Keep responses concise and structured.
