Summary
After upgrading OpenClaw to the latest version, using /new in Telegram direct chats can cause the assistant to continue replying to the previous conversation instead of starting a clean new session.
This started only after the latest OpenClaw update. The current suspicion is that memoryReflection state is being generated on command:new and then injected back into the next session through before_prompt_build, especially when injectMode is set to inheritance+derived.
Environment
- OpenClaw:
2026.4.26
- Channel: Telegram direct chat
- memory-lancedb-pro:
1.1.0-beta.10
- Plugin build tag seen in logs:
memory-lancedb-pro-diag-20260308-0058
- Config:
smartExtraction: true
sessionStrategy: "memoryReflection"
memoryReflection.injectMode: "inheritance+derived"
Observed behavior
After /new, the next user message may still receive a reply that continues or references the previous conversation, as if the new session inherited too much execution context.
This is not just broad long-term memory recall. It behaves more like previous-session reflection/derived context is being re-injected into the fresh session.
Expected behavior
After /new, the next session should be clean at the conversation level.
Long-term memory or stable behavioral rules may still be available, but the assistant should not continue the previous session's active reply context.
Reproduction pattern
- Use OpenClaw with
memory-lancedb-pro enabled.
- Configure:
sessionStrategy: "memoryReflection"
memoryReflection.injectMode: "inheritance+derived"
- Chat with the assistant in Telegram direct chat.
- Send
/new.
- Send a new message on a different topic.
- Observe that the assistant may still respond as if it is continuing the previous conversation.
Relevant findings
- The plugin registers these hooks in the current setup:
command:new
command:reset
before_prompt_build
after_tool_call
session_end
- The current implementation appears to do this sequence:
/new triggers runMemoryReflection
- reflection/derived slices are generated from the previous session
- the next session's
before_prompt_build injects inherited and/or derived reflection context back into the prompt
- This makes it plausible that prior-session derived context leaks across the
/new boundary.
Why this looks like a regression
This issue only started after updating OpenClaw to the latest version.
That suggests an integration regression around hook migration / prompt-build timing / session reset boundaries, rather than a long-standing memory configuration issue.
Suspected root cause
A session-boundary leak between:
command:new reflection generation for the previous session
before_prompt_build reflection injection for the next session
Possibly one of these:
- newly generated derived reflection is immediately eligible for injection into the fresh session
- session-specific cached derived state is not cleared strictly enough across
/new
- the new session still resolves previous-session reflection data too aggressively when
injectMode = inheritance+derived
Suggested direction
Potential fixes could include one or more of:
- do not inject
derived reflection into the first turn after /new
- limit
/new carryover to stable inheritance only
- make derived reflection strictly session-local and never eligible for the next fresh session
- add an explicit guard so
command:new output from the just-closed session cannot re-enter the immediately opened session as active prompt context
Notes
I have not yet reduced this to a minimal standalone test case in code, but the configuration, hook registration, and behavior are consistent with a memoryReflection cross-session leakage bug triggered by /new on the latest OpenClaw.
Summary
After upgrading OpenClaw to the latest version, using
/newin Telegram direct chats can cause the assistant to continue replying to the previous conversation instead of starting a clean new session.This started only after the latest OpenClaw update. The current suspicion is that
memoryReflectionstate is being generated oncommand:newand then injected back into the next session throughbefore_prompt_build, especially wheninjectModeis set toinheritance+derived.Environment
2026.4.261.1.0-beta.10memory-lancedb-pro-diag-20260308-0058smartExtraction: truesessionStrategy: "memoryReflection"memoryReflection.injectMode: "inheritance+derived"Observed behavior
After
/new, the next user message may still receive a reply that continues or references the previous conversation, as if the new session inherited too much execution context.This is not just broad long-term memory recall. It behaves more like previous-session reflection/derived context is being re-injected into the fresh session.
Expected behavior
After
/new, the next session should be clean at the conversation level.Long-term memory or stable behavioral rules may still be available, but the assistant should not continue the previous session's active reply context.
Reproduction pattern
memory-lancedb-proenabled.sessionStrategy: "memoryReflection"memoryReflection.injectMode: "inheritance+derived"/new.Relevant findings
command:newcommand:resetbefore_prompt_buildafter_tool_callsession_end/newtriggersrunMemoryReflectionbefore_prompt_buildinjects inherited and/or derived reflection context back into the prompt/newboundary.Why this looks like a regression
This issue only started after updating OpenClaw to the latest version.
That suggests an integration regression around hook migration / prompt-build timing / session reset boundaries, rather than a long-standing memory configuration issue.
Suspected root cause
A session-boundary leak between:
command:newreflection generation for the previous sessionbefore_prompt_buildreflection injection for the next sessionPossibly one of these:
/newinjectMode = inheritance+derivedSuggested direction
Potential fixes could include one or more of:
derivedreflection into the first turn after/new/newcarryover to stableinheritanceonlycommand:newoutput from the just-closed session cannot re-enter the immediately opened session as active prompt contextNotes
I have not yet reduced this to a minimal standalone test case in code, but the configuration, hook registration, and behavior are consistent with a
memoryReflectioncross-session leakage bug triggered by/newon the latest OpenClaw.