From f5f8ba6d35a1a52b588ccae1f2e5a98730aaaca8 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 29 Mar 2026 21:07:58 +0100 Subject: [PATCH] fix: harden bundle MCP session runtime cache (#55090) (thanks @allan0509) --- CHANGELOG.md | 1 + src/auto-reply/reply/session.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1724f0e614c..22ddba3d66c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ Docs: https://docs.openclaw.ai - Security/LINE: make webhook signature validation run the timing-safe compare even when the supplied signature length is wrong, closing a small timing side-channel. (#55663) Thanks @gavyngong. - LINE/status: stop `openclaw status` from warning about missing credentials when sanitized LINE snapshots are already configured, while still surfacing whether the missing field is the token or secret. (#45701) Thanks @tamaosamu. - Gateway/health: carry webhook-vs-polling account mode from channel descriptors into runtime snapshots so passive channels like LINE and BlueBubbles skip false stale-socket health failures. (#47488) Thanks @karesansui-u. +- Agents/MCP: reuse bundled MCP runtimes across turns in the same session, while recreating them when MCP config changes and disposing stale runtimes cleanly on session rollover. (#55090) Thanks @allan0509. - Memory/QMD: honor `memory.qmd.update.embedInterval` even when regular QMD update cadence is disabled or slower by arming a dedicated embed-cadence maintenance timer, while avoiding redundant timers when regular updates are already frequent enough. (#37326) Thanks @barronlroth. - Agents/memory flush: keep daily memory flush files append-only during embedded attempts so compaction writes do not overwrite earlier notes. (#53725) Thanks @HPluseven. - Web UI/markdown: stop bare auto-links from swallowing adjacent CJK text while preserving valid mixed-script path and query characters in rendered links. (#48410) Thanks @jnuyao. diff --git a/src/auto-reply/reply/session.ts b/src/auto-reply/reply/session.ts index f70ed10b835..facd591330f 100644 --- a/src/auto-reply/reply/session.ts +++ b/src/auto-reply/reply/session.ts @@ -7,6 +7,7 @@ import { disposeSessionMcpRuntime } from "../../agents/pi-bundle-mcp-tools.js"; import { normalizeChatType } from "../../channels/chat-type.js"; import type { OpenClawConfig } from "../../config/config.js"; import { resolveGroupSessionKey } from "../../config/sessions/group.js"; +import { canonicalizeMainSessionAlias } from "../../config/sessions/main-session.js"; import { deriveSessionMetaPatch } from "../../config/sessions/metadata.js"; import { resolveSessionTranscriptPath, resolveStorePath } from "../../config/sessions/paths.js"; import { @@ -25,7 +26,6 @@ import { type SessionEntry, type SessionScope, } from "../../config/sessions/types.js"; -import { canonicalizeMainSessionAlias } from "../../config/sessions/main-session.js"; import type { TtsAutoMode } from "../../config/types.tts.js"; import { getSessionBindingService } from "../../infra/outbound/session-binding-service.js"; import { deliverSessionMaintenanceWarning } from "../../infra/session-maintenance-warning.js";