openclaw - 💡(How to fix) Fix [Bug]: /new Discord session can receive stale lossless-claw summaries as active context [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#73784Fetched 2026-04-29 06:15:13
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

After /new in a Discord channel session using lossless-claw as the context engine, compacted/summary context from the prior logical channel conversation can be injected into the fresh session and treated as active user intent.

Root Cause

  • lossless-claw active as the context engine
  • Hindsight active separately for memory
  • session-memory internal hook was disabled, so the behavior was not caused by the bundled /new//reset session-memory hook
  • Discord channel session key remained stable across /new

Code Example

User: Ok I just gave you a new session, and look what you barfed up after, a complete message from probably 8 hrs ago. How?

Assistant: Because the “new” session wasn’t actually clean at the prompt level.

OpenClaw injected a lossless-claw condensed summary of the old apartment-rent conversation into the new session, and it appeared as live conversational material:

<summary id="sum_02da0001f1a25520" ... latest_at="2026-04-27T23:26:56">

I then screwed up by treating that summary as something you wanted continued, instead of recognizing it as stale context/recall scaffolding. So I effectively answered the ghost of the old thread.

---

User: Are you responding to a test message or previous context?

Assistant: Previous context.

That summary block looked like recovered/compacted conversation history, so I treated it as context and replied as if the session had just resumed. Your actual new message was the question asking whether that was what happened.

So: not a test message. Context-resume reflex fired.

---

Main profile:
- hooks.internal.enabled: true
- Enabled hooks: boot-md, command-logger
- session-memory: disabled
- plugins.slots.contextEngine: lossless-claw
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

After /new in a Discord channel session using lossless-claw as the context engine, compacted/summary context from the prior logical channel conversation can be injected into the fresh session and treated as active user intent.

Steps to reproduce

  1. Run OpenClaw 2026.4.26 in a Discord channel session with plugins.slots.contextEngine = lossless-claw.
  2. Have an existing channel conversation with prior compacted/lossless summaries available.
  3. Send /new in that Discord channel.
  4. Send a simple test message such as: Are you responding to a test message or previous context?
  5. Observe that stale compacted context from the previous channel conversation can be included and answered as if it were current conversation content.

Expected behavior

/new should isolate the new runtime session from prior active-turn context. Lossless/compacted summaries may remain available through explicit recall tooling, but they should not be injected in a way that the model can treat as the current user turn or conversational continuation.

Actual behavior

After /new, the agent received lossless/compacted summary context from the prior channel conversation and responded to that stale context instead of treating the user’s new test message as the only active intent.

In one observed case, the user asked whether the assistant was responding to a test message or previous context. The assistant answered: Previous context. It identified that the summary block looked like recovered/compacted conversation history and that a context-resume reflex had fired.

A later investigation found that the Discord channel session key remained stable across /new, while the runtime session changed. The lossless-claw/context-engine continuity appears to follow the stable logical session key, so old summaries can cross the /new boundary.

OpenClaw version

2026.4.26 (d8c2f18 observed in trajectory metadata)

Operating system

macOS 26.4.1 / Darwin 25.4.0 arm64

Install method

npm/global Homebrew Node install, launched as OpenClaw gateway (node .../openclaw/dist/index.js gateway --port 18789)

Model

Observed with OpenAI Codex GPT-5.5 and Ollama gemma4:31b-cloud in related traces; the failure appears context/session-bound rather than model-specific.

Provider / routing chain

OpenClaw Discord channel -> OpenClaw gateway -> configured agent model/provider; lossless-claw active as plugins.slots.contextEngine.

Additional provider/model setup details

The relevant memory/context stack was:

  • lossless-claw active as the context engine
  • Hindsight active separately for memory
  • session-memory internal hook was disabled, so the behavior was not caused by the bundled /new//reset session-memory hook
  • Discord channel session key remained stable across /new

Logs, screenshots, and evidence

Redacted evidence from the affected deployment:

User: Ok I just gave you a new session, and look what you barfed up after, a complete message from probably 8 hrs ago. How?

Assistant: Because the “new” session wasn’t actually clean at the prompt level.

OpenClaw injected a lossless-claw condensed summary of the old apartment-rent conversation into the new session, and it appeared as live conversational material:

<summary id="sum_02da0001f1a25520" ... latest_at="2026-04-27T23:26:56">

I then screwed up by treating that summary as something you wanted continued, instead of recognizing it as stale context/recall scaffolding. So I effectively answered the ghost of the old thread.

A follow-up repro in the same channel:

User: Are you responding to a test message or previous context?

Assistant: Previous context.

That summary block looked like recovered/compacted conversation history, so I treated it as context and replied as if the session had just resumed. Your actual new message was the question asking whether that was what happened.

So: not a test message. Context-resume reflex fired.

Config/state evidence from local inspection:

Main profile:
- hooks.internal.enabled: true
- Enabled hooks: boot-md, command-logger
- session-memory: disabled
- plugins.slots.contextEngine: lossless-claw

Related issues that look adjacent but not duplicate:

  • #31253: mem0 plugin session-scoped memories persist across /new because run_id = stable sessionKey
  • #59349: exec approval follow-up can leak into a new session after /new because it rebinds by sessionKey instead of original sessionId
  • #69155: session reset kept old transcript file / context bloat; closed as fixed for transcript path rotation, but this issue concerns lossless/context-engine summary injection

Impact and severity

Affected: Discord channel sessions using lossless-claw context engine where /new is expected to create a clean conversational boundary.

Severity: Medium to high behavior bug. It breaks user trust in /new, can cause the agent to answer stale/private/irrelevant summarized context, and makes clean repro/debug sessions unreliable.

Frequency: Observed more than once in the same Discord channel after /new; not yet proven always deterministic.

Consequence: Fresh sessions can appear haunted by prior compacted context, causing incorrect replies and potential privacy/context-boundary violations.

Additional information

Authorship note: this issue description was authored by Charles, Ryan’s OpenClaw assistant, at Ryan’s request so that the report is transparent about agent involvement.

This may be an isolation-contract bug rather than a pure lossless-claw bug: /new rotates the active runtime session, but stable channel sessionKey appears to remain the continuity anchor used by the context engine. The desired contract likely needs a conversation-scoped identifier/generation that resets on /new, or the context engine needs to treat /new as a hard boundary for proactive summary injection while preserving explicit recall access.

extent analysis

TL;DR

The most likely fix involves modifying the lossless-claw context engine to treat the /new command as a hard boundary for proactive summary injection, while preserving explicit recall access.

Guidance

  • Investigate the lossless-claw context engine's session key management to determine why it follows the stable logical session key instead of the runtime session.
  • Consider introducing a conversation-scoped identifier that resets on /new to ensure a clean conversational boundary.
  • Review the session-memory internal hook to see if its disabled state contributes to the issue, even though it's claimed not to be the cause.
  • Examine the plugins.slots.contextEngine configuration to ensure it's properly set up to handle the /new command correctly.

Example

No code snippet is provided due to the complexity of the issue and the need for a thorough investigation of the lossless-claw context engine.

Notes

The issue appears to be context/session-bound rather than model-specific, and the desired contract likely needs a conversation-scoped identifier/generation that resets on /new. The stable channel sessionKey remaining the continuity anchor used by the context engine may be the root cause.

Recommendation

Apply a workaround by modifying the lossless-claw context engine to treat /new as a hard boundary, as this is the most direct way to address the issue without introducing new complexities.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

/new should isolate the new runtime session from prior active-turn context. Lossless/compacted summaries may remain available through explicit recall tooling, but they should not be injected in a way that the model can treat as the current user turn or conversational continuation.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: /new Discord session can receive stale lossless-claw summaries as active context [1 participants]