openclaw - ✅(Solved) Fix [Bug]: 2026.4.14 Broke lossless-claw: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw"." [2 pull requests, 2 comments, 2 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#66591Fetched 2026-04-15 06:25:31
View on GitHub
Comments
2
Participants
2
Timeline
10
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×4commented ×2labeled ×2closed ×1

Upon upgrading to 2026.4.14, the lossless-claw engine appears to be broken. Attempting to communicate with the bot shows this error:

⚠️ Something went wrong while processing your request. Please try again, or use /new to start a fresh session.

Checking the openclaw logs I see the following message:

13:59:11+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=main durationMs=57 error="Error: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw"." 13:59:11+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=session:agent:main:discord:direct:removed durationMs=58 error="Error: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw"." 13:59:11+00:00 error Embedded agent failed before reply: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw".

I am using lossless-claw 0.8.2.

Error Message

13:59:11+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=main durationMs=57 error="Error: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw"." 13:59:11+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=session:agent:main:discord:direct:removed durationMs=58 error="Error: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw"." 13:59:11+00:00 error Embedded agent failed before reply: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw".

Root Cause

Upon upgrading to 2026.4.14, the lossless-claw engine appears to be broken. Attempting to communicate with the bot shows this error:

⚠️ Something went wrong while processing your request. Please try again, or use /new to start a fresh session.

Checking the openclaw logs I see the following message:

13:59:11+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=main durationMs=57 error="Error: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw"." 13:59:11+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=session:agent:main:discord:direct:removed durationMs=58 error="Error: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw"." 13:59:11+00:00 error Embedded agent failed before reply: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw".

I am using lossless-claw 0.8.2.

Fix Action

Fixed

PR fix notes

PR #66609: fix(context-engine): fix MockContextEngine ID mismatch regression

Description (problem / solution / changelog)

Fixes #66591 - Critical regression where lossless-claw context engine is completely broken in release 2026.4.14

Problem

The validation added in commit 2677f7cf14 requires context engine to match the registered ID. had hardcoded but could be registered with dynamic IDs, causing validation failures that break user systems with lossless-claw enabled.

Root Cause

  • New validation: throws error 'info.id must match registered id'
  • returns hardcoded
  • Tests register with dynamic IDs like 'cross-chunk-12345'
  • Similar pattern likely exists in third-party plugins like lossless-claw

Solution

Update MockContextEngine constructor to accept parameter
Set info.id dynamically instead of hardcoded 'mock'
Update all test usages to pass correct engineId
Add regression test specifically for #66591
All 37 tests pass including new regression test

Testing

  • Added regression test: Verifies class-based engines work with dynamic IDs
  • All existing tests pass: 37/37 ✅
  • Full quality checks pass: TypeScript, lint, import cycles ✅
  • Zero breaking changes: Maintains backward compatibility

Files Changed

  • : Fix MockContextEngine + add regression test

Status: Ready for review - Critical fix for P0 regression

Changed files

  • src/context-engine/context-engine.test.ts (modified, +20/-7)

PR #65589: feat(memory-core): dreaming circuit breaker to prevent runaway cost and data corruption

Description (problem / solution / changelog)

Summary

  • Adds a DreamingBudgetEnforcer module to the memory-core plugin that prevents dreaming runaway loops from burning unbounded API costs and corrupting daily notes
  • Implements three independent safety layers: per-cycle deduplication, sliding-window cost circuit breaker, and confidence-gated candidate filtering
  • Includes an integration helper (filterCandidatesThroughEnforcer) showing exactly how the enforcer plugs into the existing dreaming.ts pipeline
  • Covers all functionality with 51 unit tests including boundary conditions, persistence round-trips, and edge cases

Motivation

Issue #65550 documents a real production incident where the dreaming system entered an uncontrolled loop:

  • 94 LLM subagent sessions spawned in 65 minutes
  • $4.35 burned on API calls producing entirely garbage output
  • 302 lines of dream fragments overwrote real daily notes (data corruption)
  • All candidates had confidence: 0.00, recalls: 0 — zero-value entries that should never have been processed
  • 76 of 94 sessions reprocessed the same stale data with no deduplication

Root causes identified:

  1. No per-cycle deduplication — same candidates reprocessed in tight loops
  2. No cost tracking or budget cap — no awareness of accumulated API spend
  3. No candidate quality gate — zero-confidence entries passed through to expensive LLM calls

Users' only recourse is disabling dreaming entirely (dreaming.enabled: false), losing the long-term memory consolidation feature that is a core differentiator of OpenClaw.

Design

DreamingBudgetEnforcer (dreaming-budget.ts)

A stateful class instantiated at the start of each dreaming cycle with three guard methods:

LayerMethodWhat it prevents
DeduplicationshouldSkipDuplicate(snippet)Same content processed twice (SHA-256 fingerprint of normalized text)
Cost breakerisBudgetExceeded(nowMs?)Cumulative API cost exceeding configurable budget ($1.00/60min default)
Quality gateshouldSkipLowQuality(candidate)Zero-confidence/zero-recall candidates reaching LLM calls

Plus a composite checkCandidate() that runs all three checks in priority order (budget > quality > dedup).

Persistence: Budget state is saved to memory/.dreams/dreaming-budget.json via atomic write (temp file + rename) so it survives SIGUSR1 restarts. Uses the same file I/O patterns as short-term-promotion.ts.

Configuration: All thresholds are configurable via the plugin config schema under dreaming.budget:

{
  "dreaming": {
    "budget": {
      "maxCostUsd": 1.0,
      "windowMs": 3600000,
      "minConfidence": 0.05,
      "minRecalls": 1
    }
  }
}

Integration guide (dreaming-budget-integration.ts)

Documents the 6 exact integration points in the existing dreaming.ts pipeline with code snippets showing where each enforcer call is inserted. Also exports filterCandidatesThroughEnforcer() — a helper that filters ranked promotion candidates through all three safety layers and returns a breakdown of skip reasons.

Test plan

  • 51 vitest unit tests covering:
    • Fingerprinting: consistency, normalization, uniqueness, format validation
    • Deduplication: first/second encounter, case variants, cross-instance independence
    • Quality gate: zero confidence, zero recall, NaN, negative, custom thresholds
    • Cost breaker: under/over budget, latching behavior, window reset, default cost, invalid values
    • Composite check: priority ordering (budget > quality > dedup)
    • Persistence: save/load round-trip, missing file, corrupt JSON, wrong version, restart survival
    • Integration filter: valid candidates, duplicates, low quality, budget exceeded, empty list
    • Boundary conditions: exactly-at-threshold for confidence/cost, latch persistence through window expiry, state immutability
  • Verify existing dreaming.test.ts tests still pass after integration
  • Manual test: enable dreaming with budget.maxCostUsd: 0.10 and verify the cycle halts at the budget with a warning log

Closes #65550

Changed files

  • extensions/memory-core/src/dreaming-budget-integration.ts (added, +167/-0)
  • extensions/memory-core/src/dreaming-budget.test.ts (added, +541/-0)
  • extensions/memory-core/src/dreaming-budget.ts (added, +245/-0)

Code Example

13:59:11+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=main durationMs=57 error="Error: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw"."
13:59:11+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=session:agent:main:discord:direct:removed durationMs=58 error="Error: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw"."
13:59:11+00:00 error Embedded agent failed before reply: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw".
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Upon upgrading to 2026.4.14, the lossless-claw engine appears to be broken. Attempting to communicate with the bot shows this error:

⚠️ Something went wrong while processing your request. Please try again, or use /new to start a fresh session.

Checking the openclaw logs I see the following message:

13:59:11+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=main durationMs=57 error="Error: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw"." 13:59:11+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=session:agent:main:discord:direct:removed durationMs=58 error="Error: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw"." 13:59:11+00:00 error Embedded agent failed before reply: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw".

I am using lossless-claw 0.8.2.

Steps to reproduce

  1. Update to 2026.4.14.
  2. Attempt to communicate with OpenClaw.
  3. Receive error message.

Expected behavior

OpenClaw should respond without issue.

Actual behavior

⚠️ Something went wrong while processing your request. Please try again, or use /new to start a fresh session.

OpenClaw version

2026.4.14

Operating system

Ubuntu 24.04

Install method

install.sh

Model

anthropic/claude-sonnet-4-6

Provider / routing chain

openclaw -> Anthcopic API

Additional provider/model setup details

No response

Logs, screenshots, and evidence

13:59:11+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=main durationMs=57 error="Error: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw"."
13:59:11+00:00 error diagnostic {"subsystem":"diagnostic"} lane task error: lane=session:agent:main:discord:direct:removed durationMs=58 error="Error: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw"."
13:59:11+00:00 error Embedded agent failed before reply: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw".

Impact and severity

Severity is high since it breaks OpenClaw entirely with lossless-claw enabled. lossless-claw must be disabled to restore functionality.

Additional information

No response

extent analysis

TL;DR

The lossless-claw engine is likely broken due to an incompatible version with OpenClaw 2026.4.14, causing an error when trying to communicate with the bot.

Guidance

  • Verify that the lossless-claw version 0.8.2 is compatible with OpenClaw 2026.4.14, as the error message suggests a mismatch in the ContextEngine id.
  • Check the OpenClaw documentation for any specific requirements or recommendations for using the lossless-claw engine with version 2026.4.14.
  • Consider downgrading to a previous version of OpenClaw that is known to work with lossless-claw 0.8.2, if possible.
  • If lossless-claw is not essential, disable it to restore functionality to OpenClaw, as mentioned in the issue.

Notes

The issue seems to be related to a version compatibility problem between OpenClaw and the lossless-claw engine. Without more information about the specific requirements of lossless-claw or OpenClaw, it's difficult to provide a more detailed solution.

Recommendation

Apply workaround: Disable lossless-claw to restore functionality to OpenClaw, as it is currently breaking the entire system.

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

OpenClaw should respond without issue.

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 - ✅(Solved) Fix [Bug]: 2026.4.14 Broke lossless-claw: Context engine "lossless-claw" factory returned an invalid ContextEngine: info.id must match registered id "lossless-claw"." [2 pull requests, 2 comments, 2 participants]