openclaw - ✅(Solved) Fix [Bug]: #LosslessClaw + OpenClaw v2026.3.11: Tasks stop silently, token shows `n/a`, context compression not triggered [1 pull requests, 4 comments, 4 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#44511Fetched 2026-04-08 00:45:54
View on GitHub
Comments
4
Participants
4
Timeline
10
Reactions
0
Author
Timeline (top)
commented ×4cross-referenced ×2labeled ×2closed ×1

After upgrading to OpenClaw v2026.3.11 with LosslessClaw enabled, long tasks silently halt, session token displays  n/a , and context compression never triggers due to broken context engine interop

Error Message

Long-running tasks halt silently in the middle with no error message or reply posted. The session token shows  n/a  permanently and does not update. Context compression fails to trigger even with  context_strategy: em  configured. The gateway logs show "reply target not found"; no fallback or retry occurs, and the pipeline exits quietly. 00:38:55 [lcm] completeSimple error code: No exports main defined in ...\mariko-chat\api\package.json Consequence: Long tasks stop silently without feedback; context compression fails; agent cannot finish jobs; no error visibility; manual  /reset  required to avoid interruption

Root Cause

After upgrading to OpenClaw v2026.3.11 with LosslessClaw enabled, long tasks silently halt, session token displays  n/a , and context compression never triggers due to broken context engine interop

Fix Action

Fix / Workaround

Last known good version: Unknown (pre‑v2026.3.11, prior versions also unstable; not a regression) First known bad version: OpenClaw v2026.3.11 Temporary workaround: Manually run  /compact  during long‑running tasks to force context compression and prevent silent termination. Related issues:

PR fix notes

PR #44779: fix(context-engine): preserve legacy plugin sessionKey interop

Description (problem / solution / changelog)

Fixes #44511

Problem

Older context-engine plugins such as LosslessClaw can reject the new top-level sessionKey parameter added during the recent context-engine refactor when they validate method inputs strictly. Once that happens, the plugin falls back to degraded token-counting paths and compaction stops triggering reliably.

Solution

Wrap resolved context engines with a compatibility layer. OpenClaw now calls the modern interface first, but if the engine throws a strict unknown-key error for sessionKey, it retries once with the legacy parameter shape. Non-compatibility runtime errors still surface immediately.

Verification

  • pnpm exec vitest run src/context-engine/context-engine.test.ts

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/context-engine/context-engine.test.ts (modified, +198/-0)
  • src/context-engine/registry.ts (modified, +197/-1)

Code Example

00:38:55 [lcm] completeSimple error code: No exports main defined in ...\mariko-chat\api\package.json
00:38:55 [lcm] content preview: all extraction attempts exhausted; provider=custom-volcengine-ark; model=doubao-seed-2.0-code; source=fallback
00:38:55 [res] chat.send
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Summary

After upgrading to OpenClaw v2026.3.11 with LosslessClaw enabled, long tasks silently halt, session token displays  n/a , and context compression never triggers due to broken context engine interop

Steps to reproduce

1. Update to OpenClaw v2026.3.11 ​ 2. Install & enable LosslessClaw ​ 3. Run long task (automation/skill) ​ 4. Observe: task stops | token  n/a  | fallback/exports errors in log

Expected behavior

  • Token counting works with LosslessClaw. ​
  • Context compression triggers per config. ​
  • No silent failures; clear errors or retrie

Actual behavior

Long-running tasks halt silently in the middle with no error message or reply posted. The session token shows  n/a  permanently and does not update. Context compression fails to trigger even with  context_strategy: em  configured. The gateway logs show "reply target not found"; no fallback or retry occurs, and the pipeline exits quietly.

OpenClaw version

2026.3.11

Operating system

Windows server 2022

Install method

pnpm dev

Model

custom-volcengine-ark (doubao-seed-2.0-code)

Provider / routing chain

OpenClaw -> LosslessClaw (plugin interception) -> custom-volcengine-ark -> doubao-seed-2.0-code

Config file / key location

No response

Additional provider/model setup details

No response

Logs, screenshots, and evidence

00:38:55 [lcm] completeSimple error code: No exports main defined in ...\mariko-chat\api\package.json
00:38:55 [lcm] content preview: all extraction attempts exhausted; provider=custom-volcengine-ark; model=doubao-seed-2.0-code; source=fallback
00:38:55 [res] chat.send

Impact and severity

Affected: All users running OpenClaw v2026.3.11 with LosslessClaw enabled Severity: High (blocks long-duration automation workflows) Frequency: 100% reproducible Consequence: Long tasks stop silently without feedback; context compression fails; agent cannot finish jobs; no error visibility; manual  /reset  required to avoid interruption

Additional information

Last known good version: Unknown (pre‑v2026.3.11, prior versions also unstable; not a regression) First known bad version: OpenClaw v2026.3.11 Temporary workaround: Manually run  /compact  during long‑running tasks to force context compression and prevent silent termination. Related issues:

  • #23303: Background exec sessions silently killed after ~30 minutes (SIGTERM on compaction) ​
  • #10384: Agent session blown by oversized toolResult (237k tokens) ​
  • #44235: OpenClaw 2026.3.11 版本存在严重稳定性问题:Gateway 状态异常、子代理任务超时

Additional context: This issue only occurs with LosslessClaw enabled, due to incompatible interception over the refactored context/token‑counting interface. Gateway logs show “reply target not found” with  source=fallback  when tasks terminate silently.

extent analysis

Fix Plan

To resolve the issue with OpenClaw v2026.3.11 and LosslessClaw, follow these steps:

  • Update LosslessClaw to a compatible version: Ensure that LosslessClaw is updated to a version that is compatible with OpenClaw v2026.3.11.
  • Modify the context engine interop:
    • Update the context_strategy to legacy or compat to ensure compatibility with the refactored context/token-counting interface.
    • Example:

context_strategy: legacy

* **Implement retry logic for fallbacks**:
  * Add retry logic to handle cases where the reply target is not found.
  * Example:
    ```javascript
const maxRetries = 3;
const retryDelay = 5000; // 5 seconds

function sendReply(target, data) {
  let retries = 0;
  function attemptSend() {
    // Send reply logic here
    if (/* reply target not found */) {
      if (retries < maxRetries) {
        retries++;
        setTimeout(attemptSend, retryDelay);
      } else {
        // Handle max retries exceeded
      }
    }
  }
  attemptSend();
}
  • Increase the token count limit:
    • Update the token count limit to prevent oversized tool results from causing issues.
    • Example:

token_count_limit: 500000


### Verification
To verify that the fix worked:

* Run a long task with LosslessClaw enabled and verify that it completes without silent termination.
* Check the gateway logs for any errors or warnings related to reply targets or token counting.
* Verify that context compression triggers correctly and that the session token is updated as expected.

### Extra Tips
* Monitor the gateway logs for any issues related to LosslessClaw and OpenClaw.
* Consider implementing additional logging or monitoring to detect and respond to silent terminations or other issues.
* Review the related issues (#23303, #10384, #44235) for any additional information or workarounds that may be relevant to this issue.

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

  • Token counting works with LosslessClaw. ​
  • Context compression triggers per config. ​
  • No silent failures; clear errors or retrie

Still need to ship something?

×6

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

Back to top recommendations

TRENDING