session-recall

Recover conversation context when a message arrives with unclear meaning. Use when a user's message lacks context (e.g. "I logged in" with no prior mention of logging in), when resuming after compaction or session reset, or when switching between channels and losing thread. Searches session transcripts, channel summaries, memory files, and cross-channel history to reconstruct context before asking the user.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "session-recall" with this command: npx skills add yozu/agent-session-recall

Session Recall

Recover missing conversation context autonomously. Never ask the user "what are you talking about?" until all steps are exhausted.

When This Triggers

  • An incoming message doesn't match the current session context
  • Session starts after compaction (.jsonl.reset exists)
  • User references something not in current context window
  • User references a topic from another channel or a cron-delivered notification
  • Thread reply arrives without visible parent context

Recovery Flow

Execute steps in order. Stop early if sufficient context is found.

Step 0: sessions_history (fastest check)

Use sessions_history to retrieve recent messages for the current channel. This requires no file I/O and is the quickest way to recover recent context.

Step 1: Same-channel transcript

Read the .jsonl transcript for the current session:

  1. Look up the session associated with this channel via sessions_list or sessions.json
  2. Read ~/.openclaw/agents/{agent}/sessions/{sessionId}.jsonl (default agent: main)
  3. For large files, read the tail first (tail -n 200) rather than loading the entire file
  4. Check for .reset files with the same sessionId prefix (pre-compaction data)
  5. If the message is a thread reply, read the parent message first

Step 2: Channel context summary

Read memory/channel_context/{channel-name}.md if it exists. These are user-maintained summaries of ongoing topics per channel — not a built-in OpenClaw feature, but a recommended convention.

Step 3: Cross-channel and cron search

Messages often originate from cron jobs or other channels.

  1. Extract key terms from the unclear message
  2. Use the bundled search script or grep across all .jsonl files:
    ./scripts/search_sessions.sh "keyword"
    
  3. Also search for the current channel ID in other sessions — cron jobs send messages to channels but these don't appear in the channel's own .jsonl:
    ./scripts/search_sessions.sh "{current_channel_id}"
    
  4. When a match is found, read surrounding context to understand the full conversation
  5. Sort results by timestamp, prioritize most recent

Step 4: Memory files

  1. memory/active_context.md — current shared context across channels
  2. memory/YYYY-MM-DD.md — today and yesterday's daily notes
  3. Semantic memory search if available in your setup (e.g., memory_search tool)

Step 5: Ask the user (last resort)

Only after steps 0–4 yield nothing. Be specific about what was searched:

"Searched this channel's transcript, cross-channel sessions (including cron), and memory files for '{keyword}' but couldn't find context. What are you referring to?"

Key Insight: Cron-to-Channel Messages

Cron jobs can send messages to channels via sessions_send or direct API calls. These messages:

  • Appear in the chat platform for the user to see
  • Are logged in the cron session's .jsonl, NOT the target channel's .jsonl
  • Require Step 3's channel-ID search to discover

This is the most common cause of unrecognized messages — the user is responding to something a cron job sent.

Security Note

Session transcripts may contain sensitive data (API keys, passwords, personal information). Do not pipe search output to public channels or logs. This skill assumes single-user/single-agent deployment.

Notes

  • Path ~/.openclaw/agents/main/sessions/ assumes default agent name main. Adjust if using a custom agent name.
  • Channel context files (memory/channel_context/) are a recommended convention, not built-in. Users create and maintain these themselves.
  • The search script requires python3, grep, and bash.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Huo15 Openclaw Enhance

火一五·克劳德·龙虾增强插件 v5.7.8 — 全面适配 openclaw 2026.4.24:peerDep ^4.24 + build/compat 同步到 4.24 + 14 处 api.on 全部去掉 as any 改成 typed hook(hookName 联合类型 + handler 自动推断 Pl...

Registry SourceRecently Updated
General

Content Trend Analyzer

Aggregates and analyzes content trends across platforms to identify hot topics, user intent, content gaps, and generates data-driven article outlines.

Registry SourceRecently Updated
General

Prompt Debugger

Debug prompts that produce unexpected AI outputs — diagnose failure modes, identify ambiguity and conflicting instructions, test variations, compare model re...

Registry SourceRecently Updated
General

Indie Maker News

独行者 Daily - 变现雷达。读对一条新闻,少走一年弯路。每天5分钟,给创业者装上商业雷达。聚焦一人公司、副业、创业变现资讯,智能分类,行动导向。用户下载即能用,无需本地部署!

Registry SourceRecently Updated