惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
Jina AI
Jina AI
WordPress大学
WordPress大学
Recent Announcements
Recent Announcements
G
Google Developers Blog
I
InfoQ
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
C
Check Point Blog
J
Java Code Geeks
T
Tailwind CSS Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Security Blog
Microsoft Security Blog
MongoDB | Blog
MongoDB | Blog
V
Visual Studio Blog
人人都是产品经理
人人都是产品经理
量子位
A
About on SuperTechFans
D
DataBreaches.Net
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(release): harden subagent completion delivery · openc...
steipete · 2026-04-25 · via Recent Commits to openclaw:main

@@ -75,6 +75,65 @@ const defaultSubagentAnnounceDeliveryDeps: SubagentAnnounceDeliveryDeps = {

7575

let subagentAnnounceDeliveryDeps: SubagentAnnounceDeliveryDeps =

7676

defaultSubagentAnnounceDeliveryDeps;

777778+

function resolveBoundConversationOrigin(params: {

79+

bindingConversation: ConversationRef & { parentConversationId?: string };

80+

requesterConversation?: ConversationRef;

81+

requesterOrigin?: DeliveryContext;

82+

}): DeliveryContext {

83+

const conversation = params.bindingConversation;

84+

const conversationId = conversation.conversationId?.trim() ?? "";

85+

const parentConversationId = conversation.parentConversationId?.trim() ?? "";

86+

const requesterConversationId = params.requesterConversation?.conversationId?.trim() ?? "";

87+

const requesterTo = params.requesterOrigin?.to?.trim();

88+

if (

89+

conversation.channel === "matrix" &&

90+

parentConversationId &&

91+

requesterConversationId &&

92+

parentConversationId === requesterConversationId &&

93+

requesterTo

94+

) {

95+

return {

96+

channel: conversation.channel,

97+

accountId: conversation.accountId,

98+

to: requesterTo,

99+

...(conversationId ? { threadId: conversationId } : {}),

100+

};

101+

}

102+103+

const boundTarget = resolveConversationDeliveryTarget({

104+

channel: conversation.channel,

105+

conversationId,

106+

parentConversationId,

107+

});

108+

if (

109+

requesterTo &&

110+

conversationId &&

111+

requesterConversationId &&

112+

conversationId.toLowerCase() === requesterConversationId.toLowerCase()

113+

) {

114+

return {

115+

channel: conversation.channel,

116+

accountId: conversation.accountId,

117+

to: requesterTo,

118+

threadId:

119+

boundTarget.threadId ??

120+

(params.requesterOrigin?.threadId != null && params.requesterOrigin.threadId !== ""

121+

? String(params.requesterOrigin.threadId)

122+

: undefined),

123+

};

124+

}

125+

return {

126+

channel: conversation.channel,

127+

accountId: conversation.accountId,

128+

to: boundTarget.to,

129+

threadId:

130+

boundTarget.threadId ??

131+

(params.requesterOrigin?.threadId != null && params.requesterOrigin.threadId !== ""

132+

? String(params.requesterOrigin.threadId)

133+

: undefined),

134+

};

135+

}

136+78137

function resolveRequesterSessionActivity(requesterSessionKey: string) {

79138

const activity = subagentAnnounceDeliveryDeps.getRequesterSessionActivity(requesterSessionKey);

80139

if (activity.sessionId || activity.isActive) {

@@ -243,22 +302,12 @@ export async function resolveSubagentCompletionOrigin(params: {

243302

failClosed: false,

244303

});

245304

if (route.mode === "bound" && route.binding) {

246-

const boundTarget = resolveConversationDeliveryTarget({

247-

channel: route.binding.conversation.channel,

248-

conversationId: route.binding.conversation.conversationId,

249-

parentConversationId: route.binding.conversation.parentConversationId,

250-

});

251305

return mergeDeliveryContext(

252-

{

253-

channel: route.binding.conversation.channel,

254-

accountId: route.binding.conversation.accountId,

255-

to: boundTarget.to,

256-

threadId:

257-

boundTarget.threadId ??

258-

(requesterOrigin?.threadId != null && requesterOrigin.threadId !== ""

259-

? String(requesterOrigin.threadId)

260-

: undefined),

261-

},

306+

resolveBoundConversationOrigin({

307+

bindingConversation: route.binding.conversation,

308+

requesterConversation,

309+

requesterOrigin,

310+

}),

262311

requesterOrigin,

263312

);

264313

}

@@ -489,7 +538,7 @@ async function sendSubagentAnnounceDirectly(params: {

489538

? normalizedSessionOnlyOriginChannel

490539

: undefined;

491540

const requesterActivity = resolveRequesterSessionActivity(canonicalRequesterSessionKey);

492-

if (params.expectsCompletionMessage && requesterActivity.isActive) {

541+

if (params.expectsCompletionMessage && requesterActivity.sessionId) {

493542

const woke = requesterActivity.sessionId

494543

? subagentAnnounceDeliveryDeps.queueEmbeddedPiMessage(

495544

requesterActivity.sessionId,

@@ -502,11 +551,13 @@ async function sendSubagentAnnounceDirectly(params: {

502551

path: "steered",

503552

};

504553

}

505-

return {

506-

delivered: false,

507-

path: "direct",

508-

error: "active requester session could not be woken",

509-

};

554+

if (requesterActivity.isActive) {

555+

return {

556+

delivered: false,

557+

path: "direct",

558+

error: "active requester session could not be woken",

559+

};

560+

}

510561

}

511562

if (params.signal?.aborted) {

512563

return {