openclaw - 💡(How to fix) Fix [Bug] EmbeddedAttemptSessionTakeoverError causes truncated replies + kimi-k2.6 schema incompatibility after upgrade

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…

Error Message

[2026-05-18T12:57:26.922Z] ERROR diagnostic: lane task error: lane=main durationMs=24271 error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released: <redacted>/agents/main/sessions/9b5ccdf9-f6d6-4455-a01a-255947761778.jsonl"

[2026-05-18T12:57:26.924Z] ERROR diagnostic: lane task error: lane=session:agent:main:telegram:direct:<redacted> durationMs=24274 error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released: <redacted>/agents/main/sessions/9b5ccdf9-f6d6-4455-a01a-255947761778.jsonl"

[2026-05-18T12:57:26.933Z] ERROR console: Embedded agent failed before reply: session file changed while embedded prompt lock was released: <redacted>/agents/main/sessions/9b5ccdf9-f6d6-4455-a01a-255947761778.jsonl

Root Cause

Suspected root cause: A concurrency race condition — the session .jsonl file was modified by another process/thread while the embedded agent prompt lock was released, causing the agent to abort before completing its reply.

Code Example

[2026-05-18T12:57:26.922Z] ERROR diagnostic: lane task error: lane=main durationMs=24271 error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released: <redacted>/agents/main/sessions/9b5ccdf9-f6d6-4455-a01a-255947761778.jsonl"

[2026-05-18T12:57:26.924Z] ERROR diagnostic: lane task error: lane=session:agent:main:telegram:direct:<redacted> durationMs=24274 error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released: <redacted>/agents/main/sessions/9b5ccdf9-f6d6-4455-a01a-255947761778.jsonl"

[2026-05-18T12:57:26.933Z] ERROR console: Embedded agent failed before reply: session file changed while embedded prompt lock was released: <redacted>/agents/main/sessions/9b5ccdf9-f6d6-4455-a01a-255947761778.jsonl

---

[2026-05-18T07:37:56.508Z] ERROR diagnostic: lane task error: lane=session:agent:main:main durationMs=39527 error="FailoverError: LLM request failed: provider rejected the request schema or tool payload."

[2026-05-18T07:37:56.513Z] WARN model-fallback/decision:
  {
    "reason": "format",
    "status": 400,
    "errorPreview": "400 Error from provider: Extra inputs are not permitted, field: 'messages[2].reasoning_details', value: 'The user greeted me with...'",
    "fallbackStepFinalOutcome": "chain_exhausted"
  }

[2026-05-18T07:38:44.014Z] WARN agent/embedded:
  {
    "isError": true,
    "error": "LLM request failed: provider rejected the request schema or tool payload.",
    "failoverReason": "format",
    "providerRuntimeFailureKind": "schema"
  }

---

[2026-05-18T07:57:44.289Z] WARN security: blocked URL fetch (url-fetch) targetOrigin=https://httpbin.org reason=Blocked: resolves to private/internal/special-use IP address
[2026-05-18T07:57:44.315Z] WARN security: blocked URL fetch (url-fetch) targetOrigin=https://api.firecrawl.dev reason=Blocked: resolves to private/internal/special-use IP address
[2026-05-18T07:57:51.103Z] WARN security: blocked URL fetch (url-fetch) targetOrigin=https://www.google.com reason=Blocked: resolves to private/internal/special-use IP address
[2026-05-18T07:57:51.113Z] WARN security: blocked URL fetch (url-fetch) targetOrigin=https://www.baidu.com reason=Blocked: resolves to private/internal/special-use IP address

---

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "opencode-go/deepseek-v4-pro"
      },
      "models": {
        "opencode-go/kimi-k2.6": {},
        "opencode-go/deepseek-v4-pro": {},
        "opencode-go/deepseek-v4-flash": {}
      }
    }
  },
  "gateway": {
    "mode": "local",
    "bind": "loopback"
  },
  "tools": {
    "web": {
      "search": {
        "provider": "firecrawl",
        "enabled": true
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

Describe the bug

After upgrading to 2026.5.16-beta.7, conversations on both webchat and telegram channels exhibit the following issues:

  1. Replies are truncated mid-sentence — the embedded agent fails with EmbeddedAttemptSessionTakeoverError before completing its response.
  2. LLM requests fail with 400 on kimi-k2.6 — the provider rejects the new reasoning_details field.
  3. All web_fetch / web_search tool calls are blocked — DNS resolution for public domains is classified as "private/internal IP".

To Reproduce

  1. Upgrade OpenClaw to 2026.5.16-beta.7.
  2. Send a message via telegram or webchat.
  3. Observe: the reply starts normally but gets cut off, followed by an error message.

Expected behavior

  • Replies should complete fully without truncation.
  • reasoning_details field should either be conditionally sent based on provider compatibility, or the provider should accept it.
  • Public domain URL fetches should not be blocked by the security layer.

Actual behavior

Issue 1: EmbeddedAttemptSessionTakeoverError — Truncated Replies

[2026-05-18T12:57:26.922Z] ERROR diagnostic: lane task error: lane=main durationMs=24271 error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released: <redacted>/agents/main/sessions/9b5ccdf9-f6d6-4455-a01a-255947761778.jsonl"

[2026-05-18T12:57:26.924Z] ERROR diagnostic: lane task error: lane=session:agent:main:telegram:direct:<redacted> durationMs=24274 error="EmbeddedAttemptSessionTakeoverError: session file changed while embedded prompt lock was released: <redacted>/agents/main/sessions/9b5ccdf9-f6d6-4455-a01a-255947761778.jsonl"

[2026-05-18T12:57:26.933Z] ERROR console: Embedded agent failed before reply: session file changed while embedded prompt lock was released: <redacted>/agents/main/sessions/9b5ccdf9-f6d6-4455-a01a-255947761778.jsonl

Timeline of a single conversation:

  • Inbound telegram message received
  • Model snapshot taken (vercel-ai-gateway/deepseek-v4-flash)
  • Partial reply sent via telegram
  • EmbeddedAttemptSessionTakeoverError thrown, agent aborts
  • Error message sent to telegram

Suspected root cause: A concurrency race condition — the session .jsonl file was modified by another process/thread while the embedded agent prompt lock was released, causing the agent to abort before completing its reply.


Issue 2: Model Schema Incompatibility — reasoning_details Rejected by kimi-k2.6

[2026-05-18T07:37:56.508Z] ERROR diagnostic: lane task error: lane=session:agent:main:main durationMs=39527 error="FailoverError: LLM request failed: provider rejected the request schema or tool payload."

[2026-05-18T07:37:56.513Z] WARN model-fallback/decision:
  {
    "reason": "format",
    "status": 400,
    "errorPreview": "400 Error from provider: Extra inputs are not permitted, field: 'messages[2].reasoning_details', value: 'The user greeted me with...'",
    "fallbackStepFinalOutcome": "chain_exhausted"
  }

[2026-05-18T07:38:44.014Z] WARN agent/embedded:
  {
    "isError": true,
    "error": "LLM request failed: provider rejected the request schema or tool payload.",
    "failoverReason": "format",
    "providerRuntimeFailureKind": "schema"
  }

Suspected root cause: After the upgrade, OpenClaw sends a reasoning_details field in the messages array. The opencode-go/kimi-k2.6 provider API does not accept this field and returns 400: Extra inputs are not permitted. Since no fallback model is configured (fallback chain has only 1 candidate), the request fails entirely.


Issue 3: DNS Resolution Blocked by Security Policy

[2026-05-18T07:57:44.289Z] WARN security: blocked URL fetch (url-fetch) targetOrigin=https://httpbin.org reason=Blocked: resolves to private/internal/special-use IP address
[2026-05-18T07:57:44.315Z] WARN security: blocked URL fetch (url-fetch) targetOrigin=https://api.firecrawl.dev reason=Blocked: resolves to private/internal/special-use IP address
[2026-05-18T07:57:51.103Z] WARN security: blocked URL fetch (url-fetch) targetOrigin=https://www.google.com reason=Blocked: resolves to private/internal/special-use IP address
[2026-05-18T07:57:51.113Z] WARN security: blocked URL fetch (url-fetch) targetOrigin=https://www.baidu.com reason=Blocked: resolves to private/internal/special-use IP address

Suspected root cause: DNS resolution for all public domains returns IP addresses that OpenClaw security layer classifies as private/internal/special-use, blocking all outbound URL fetches.

Environment

  • OpenClaw version: 2026.5.16-beta.7 (fff4532)
  • Node.js: v24.15.0
  • OS: Linux
  • Gateway mode: local, loopback bind
  • Primary model: opencode-go/deepseek-v4-pro
  • Channels affected: webchat, telegram

Configuration (relevant sections)

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "opencode-go/deepseek-v4-pro"
      },
      "models": {
        "opencode-go/kimi-k2.6": {},
        "opencode-go/deepseek-v4-pro": {},
        "opencode-go/deepseek-v4-flash": {}
      }
    }
  },
  "gateway": {
    "mode": "local",
    "bind": "loopback"
  },
  "tools": {
    "web": {
      "search": {
        "provider": "firecrawl",
        "enabled": true
      }
    }
  }
}

Additional context

  • Full log file available on request (~2MB, can provide privately)
  • Issue 1 is the most critical — it directly causes user-facing response truncation.
  • The EmbeddedAttemptSessionTakeoverError appears to be a regression introduced in this version, as the same configuration worked before the upgrade.

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

  • Replies should complete fully without truncation.
  • reasoning_details field should either be conditionally sent based on provider compatibility, or the provider should accept it.
  • Public domain URL fetches should not be blocked by the security layer.

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] EmbeddedAttemptSessionTakeoverError causes truncated replies + kimi-k2.6 schema incompatibility after upgrade