Search Memory
When to Search
Strong signals:
- References prior work: "the approach we used", "like last time"
- Resumes a named feature, project, or migration
- Review, regression, release, docs-alignment, or connector-behavior task
- Debugging resembles a past fix or known root cause
- Asks for rationale: "why did we choose X?"
- Recurring theme discussed in earlier sessions
Contextual signals:
- Complex debugging (may match past root causes)
- Architecture discussion (choices may be documented)
- Domain-specific question (conventions likely stored)
- User mentions a timeframe: "last week", "back in January"
Skip when:
- Fundamentally new topic with no prior context
- Generic syntax or language questions
- User explicitly requests a fresh perspective
Retrieval Routing
1. Search memories (distilled knowledge)
If the runtime already knows the active project or agent lane, add --space "<space name>".
2. Search threads (past conversations)
When the user asks about a prior session, discussion, or exact exchange:
3. Progressive thread inspection
If a thread looks relevant, load it incrementally:
Increase --offset only when more messages are actually needed.
For continuation-heavy engineering work, search near the start of the task rather than waiting for an explicit recall request.
Key Flags
Examples
Interpreting Results
Scores: 0.6-1.0 direct match. 0.3-0.6 related. Below 0.3, skip.
Found: Synthesize and cite when helpful. None: State clearly. Suggest distilling if the current discussion is valuable.
When NOT to Search
Do not search for every message. Search when there is a reasonable expectation that prior knowledge exists and would improve the response. One well-targeted search is better than three speculative ones.


