From 21162233d5fd27513431cc4f58674bf5d65576b1 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 24 Apr 2026 23:46:28 +0100 Subject: [PATCH] fix: harden Discord subagent thread config (#70945) --- CHANGELOG.md | 1 + .../discord/src/monitor/thread-bindings.lifecycle.test.ts | 2 ++ extensions/discord/src/monitor/thread-bindings.lifecycle.ts | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 594cd5216ba..397ab63f5e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Docs: https://docs.openclaw.ai ### Fixes +- Discord/subagents: pass runtime config into thread-bound native subagent binding and require it at the helper boundary so Discord channel resolution keeps account-aware config. Fixes #71054. (#70945) Thanks @jai. - Agents/failover: stop body-less HTTP 400/422 proxy failures from defaulting to `"format"` classification, so embedded retries surface the opaque provider failure instead of falling into a compaction loop. Fixes #66462. (#67024) Thanks @altaywtf and @HongzhuLiu. - Plugins/loader: use cached discovery-mode snapshot loads for read-only plugin capability lookups, keep snapshot caches isolated from active Gateway registries, and make same-plugin channel/HTTP route re-registration idempotent so repeated snapshot or hot-reload paths no longer rerun full plugin side effects or accumulate duplicate surfaces. Fixes #51781, #52031, #54181, and #57514. Thanks @livingghost, @okuyam2y, @ShionEria, and @bbshih. ## 2026.4.24 diff --git a/extensions/discord/src/monitor/thread-bindings.lifecycle.test.ts b/extensions/discord/src/monitor/thread-bindings.lifecycle.test.ts index 64dbd5fbafe..f9f29b9fd53 100644 --- a/extensions/discord/src/monitor/thread-bindings.lifecycle.test.ts +++ b/extensions/discord/src/monitor/thread-bindings.lifecycle.test.ts @@ -775,6 +775,7 @@ describe("thread binding lifecycle", () => { hoisted.createThreadDiscord.mockResolvedValueOnce({ id: "thread-created-2" }); const childBinding = await autoBindSpawnedDiscordSubagent({ + cfg: {} as OpenClawConfig, accountId: "default", channel: "discord", to: "channel:thread-1", @@ -815,6 +816,7 @@ describe("thread binding lifecycle", () => { hoisted.createThreadDiscord.mockResolvedValueOnce({ id: "thread-created-lookup" }); const childBinding = await autoBindSpawnedDiscordSubagent({ + cfg: {} as OpenClawConfig, accountId: "default", channel: "discord", to: "channel:thread-lookup", diff --git a/extensions/discord/src/monitor/thread-bindings.lifecycle.ts b/extensions/discord/src/monitor/thread-bindings.lifecycle.ts index ddf903620a8..c1576ea98ea 100644 --- a/extensions/discord/src/monitor/thread-bindings.lifecycle.ts +++ b/extensions/discord/src/monitor/thread-bindings.lifecycle.ts @@ -98,7 +98,7 @@ export function listThreadBindingsBySessionKey(params: { } export async function autoBindSpawnedDiscordSubagent(params: { - cfg?: OpenClawConfig; + cfg: OpenClawConfig; accountId?: string; channel?: string; to?: string;