






















@@ -1258,6 +1258,16 @@ export async function runCodexAppServerAttempt(
12581258turnAssistantCompletionIdleWatchArmed &&
12591259notification.method === "item/completed" &&
12601260activeTurnItemIds.size === 0;
1261+const trackedDynamicToolCompletion = isTrackedOpenClawDynamicToolCompletionNotification(
1262+notification,
1263+activeOpenClawDynamicToolCallIds,
1264+);
1265+const shouldRearmCompletionIdleWatchAfterLastCurrentTurnItem =
1266+isCurrentTurnNotification &&
1267+notification.method === "item/completed" &&
1268+activeTurnItemIds.size === 0 &&
1269+!trackedDynamicToolCompletion &&
1270+!isCompletedAssistantNotification(notification);
12611271if (isCurrentTurnNotification && notification.method === "error") {
12621272if (isRetryableErrorNotification(notification.params)) {
12631273disarmTurnCompletionIdleWatch();
@@ -1271,6 +1281,11 @@ export async function runCodexAppServerAttempt(
12711281armTurnAssistantCompletionIdleWatch(describeNotificationActivity(notification));
12721282} else if (unblockedAssistantCompletionRelease) {
12731283armTurnAssistantCompletionIdleWatch(describeNotificationActivity(notification));
1284+} else if (shouldRearmCompletionIdleWatchAfterLastCurrentTurnItem) {
1285+// If a non-assistant current-turn item is the last active item and the
1286+// bridge then goes quiet, reset the short completion-idle guard from that
1287+// final completion so the remaining silent-turn gap fails fast.
1288+armTurnCompletionIdleWatch();
12741289} else if (
12751290isCurrentTurnNotification &&
12761291shouldDisarmAssistantCompletionIdleWatch(notification)
@@ -1282,10 +1297,8 @@ export async function runCodexAppServerAttempt(
12821297!turnCompletionIdleWatchPinnedByTerminalError &&
12831298notification.method !== "turn/completed" &&
12841299isCurrentTurnNotification &&
1285-!isTrackedOpenClawDynamicToolCompletionNotification(
1286-notification,
1287-activeOpenClawDynamicToolCallIds,
1288-)
1300+!trackedDynamicToolCompletion &&
1301+!shouldRearmCompletionIdleWatchAfterLastCurrentTurnItem
12891302) {
12901303// The short completion-idle watchdog guards blind gaps after Codex
12911304// accepts a turn or after OpenClaw hands a turn-scoped request result
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。