Deep Session Search
This skill helps recover decision context (domains, PRs, deploys, commands, and error trails) from historical OpenClaw sessions when those details were discussed but never promoted into long-term memory files.
Why this exists
Section titled “Why this exists”Sometimes important details are discussed in earlier sessions but never distilled into MEMORY.md or daily notes.
This skill gives the agent a reliable fallback path:
- Try normal memory recall first.
- If recall is missing/unclear, search session logs under
~/.openclaw/agents/main/sessions. - Extract high-signal conversation/tool evidence without dumping noisy artifacts.
What it does
Section titled “What it does”- Deep session grep over
*.jsonl*logs - Noise control to avoid dependency/build blobs
- Targeted narrowing by exact domain, PR number, repo, deployment id, etc.
- Evidence-first summaries with path + relevant context
Typical trigger
Section titled “Typical trigger”Use when the user asks things like:
- “What did we do with Cloudflare today?”
- “Check earlier sessions for that domain/config”
- “Find the command we used before”
…especially when memory search has low confidence.
Search pattern
Section titled “Search pattern”Prefer ag for fast uncompressed session log scans:
ag -n --nobreak --depth 1 -G '*.jsonl' "<search-term-1>|<search-term-2>" \ ~/.openclaw/agents/main/sessionsFor compressed/rotated logs, use one of these:
# ripgrep with compressed-file supportrg -n --search-zip --max-depth 1 "<search-term-1>|<search-term-2>" \ ~/.openclaw/agents/main/sessions -g '*.jsonl*'
# or gzip-specific fallbackfind ~/.openclaw/agents/main/sessions -maxdepth 1 -name '*.jsonl.gz' \ -exec zgrep -HnE "<search-term-1>|<search-term-2>" {} +Note: these examples use regex patterns. If your search terms are literals (like domains), either escape regex special characters or use fixed-string modes (for example: ag -Q, rg -F, zgrep -F).
Then narrow to exact needles for stronger evidence.
Outcome format
Section titled “Outcome format”The skill returns concise findings with:
- whether hits were found
- strongest 1–3 examples
- where they were found (path/context)
- confidence note if results are partial/noisy