Skip to content

Fresh-session continuity break: weak first message (e.g. 🤔) skips autoRecall after restart #101

@sinskl

Description

@sinskl

Summary

After restarting OpenClaw Gateway (with memory-lancedb-pro enabled), the first user message in the fresh session can be a very low-signal continuation such as:

  • 🤔
  • ?
  • ...
  • 继续

In this case, autoRecall is silently skipped by adaptive retrieval, which makes the assistant lose continuity at exactly the moment when continuity matters most.

This is especially confusing when the user is clearly continuing the conversation right after restart: the assistant behaves as if it suddenly forgot the previous topic and replies with a generic opener.


Environment

  • OpenClaw: 2026.3.2
  • Plugin: memory-lancedb-pro
  • Memory slot: memory-lancedb-pro
  • Config:
    • autoRecall: true
    • autoCapture: true
    • sessionStrategy: "memoryReflection"
  • Embedding:
    • OpenAI-compatible / OpenRouter
    • model: qwen/qwen3-embedding-8b

Reproduction

  1. Enable memory-lancedb-pro with autoRecall: true.
  2. Have an active conversation with clear topic continuity.
  3. Restart OpenClaw Gateway (or otherwise cause a fresh session to start).
  4. Send a low-signal first message in the new session, for example: 🤔
  5. Observe the assistant response.

Observed behavior

The assistant responds as if the conversation context was not continued, e.g. with something like:

“怎么啦,在想什么?”

instead of understanding that the user is continuing the immediately previous topic.


Root cause analysis

From local code inspection:

1. before_agent_start autoRecall gate

In index.ts, autoRecall runs only if:

!shouldSkipRetrieval(event.prompt, config.autoRecallMinLength)

2. normalizeQuery() strips OpenClaw wrappers

In src/adaptive-retrieval.ts, the query is normalized by stripping:

  • Conversation info (untrusted metadata): ...
  • Sender (untrusted metadata): ...
  • timestamp wrappers
  • cron prefixes

This is correct and desirable.

3. But after stripping, the first message may collapse to just 🤔

Then shouldSkipRetrieval() returns true because of rules like:

  • pure emoji skip
  • trimmed.length < 5
  • short non-question skip

So on a fresh post-restart session, the plugin effectively says:

“this message is too weak to retrieve memory for”

But from the user experience perspective, this is exactly the moment where continuity recovery is needed most.

4. memoryReflection does not solve this

memoryReflection injects inheritance/derived guidance, but it does not restore the immediate prior conversational thread.
So the result is:

  • fresh session
  • no immediate continuity state
  • first message too weak
  • autoRecall skipped
  • user sees an apparent “amnesia” moment

Why this matters

This is not just a minor retrieval heuristic edge case.
It directly affects trust in continuity:

  • users often send very short continuation messages after restart
  • on chat surfaces, emoji / ? / 继续 / are normal follow-ups
  • the current behavior makes the assistant feel like it “suddenly forgot everything”

That user-visible effect is much worse than a normal recall miss.


Expected behavior

At least one of these should happen for the first turn of a fresh session:

  1. Do not blindly skip autoRecall for weak first-turn messages

    • e.g. relax skip rules on session-first turn
  2. Fallback continuity recovery

    • inspect recent same-chat session tail / recent reflection / session summary before deciding to skip
  3. Special handling for restart/new-session continuity turns

    • if the session is fresh and the message is weak, prefer continuity heuristics over generic skip heuristics

Suggested fix directions

Option A — session-aware skip logic

In shouldSkipRetrieval() or its caller, avoid skipping when all of the following are true:

  • this is the first user turn of a fresh session
  • the message is weak / ultra-short / pure emoji
  • there was a recent prior session for the same chat/session key

Option B — continuity fallback before skip

If a fresh-session first turn is weak, try a small continuity recovery path before returning early:

  • recent session tail
  • latest session summary / reflection-derived continuity summary
  • last-turn topic carryover

Option C — dedicated config switch

Add something like:

{
  "autoRecall": true,
  "continuityFirstTurnFallback": true
}

for users who want safer cross-restart continuity.


Related issues / PRs

In this repo

In OpenClaw core

This issue is related to the same continuity problem space, but is specifically about adaptive autoRecall skip behavior on the first weak-signal message after restart/new session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions