

























@@ -2460,6 +2460,10 @@ export async function runCodexAppServerAttempt(
24602460isReasoningItemCompletionNotification(notification) &&
24612461activeTurnItemIds.size === 0 &&
24622462params.sourceReplyDeliveryMode === "message_tool_only";
2463+const shouldArmPostRawReasoningSourceReplyWatch =
2464+rawResponseItemCompletedWithNoActiveItems &&
2465+isRawReasoningCompletionNotification(notification) &&
2466+params.sourceReplyDeliveryMode === "message_tool_only";
24632467const shouldRearmCompletionIdleWatchAfterLastCurrentTurnItem =
24642468isCurrentTurnNotification &&
24652469notification.method === "item/completed" &&
@@ -2480,7 +2484,10 @@ export async function runCodexAppServerAttempt(
24802484armTurnAssistantCompletionIdleWatch(describeNotificationActivity(notification));
24812485} else if (postToolRawAssistantCompletionNeedsTerminalGuard) {
24822486armTurnCompletionIdleWatch({ timeoutMs: postToolRawAssistantCompletionIdleTimeoutMs });
2483-} else if (shouldArmPostReasoningSourceReplyWatch) {
2487+} else if (
2488+shouldArmPostReasoningSourceReplyWatch ||
2489+shouldArmPostRawReasoningSourceReplyWatch
2490+) {
24842491armTurnCompletionIdleWatch({ timeoutMs: CODEX_POST_REASONING_SOURCE_REPLY_IDLE_TIMEOUT_MS });
24852492} else if (unblockedAssistantCompletionRelease) {
24862493armTurnAssistantCompletionIdleWatch(describeNotificationActivity(notification));
@@ -2511,6 +2518,7 @@ export async function runCodexAppServerAttempt(
25112518!postToolRawAssistantCompletionNeedsTerminalGuard &&
25122519!rawResponseItemCompletedWithNoActiveItems &&
25132520!shouldArmPostReasoningSourceReplyWatch &&
2521+!shouldArmPostRawReasoningSourceReplyWatch &&
25142522!shouldRearmCompletionIdleWatchAfterLastCurrentTurnItem
25152523) {
25162524// The short completion-idle watchdog guards blind gaps after Codex
@@ -5274,6 +5282,14 @@ function isReasoningItemCompletionNotification(notification: CodexServerNotifica
52745282return item ? readString(item, "type") === "reasoning" : false;
52755283}
527652845285+function isRawReasoningCompletionNotification(notification: CodexServerNotification): boolean {
5286+if (!isJsonObject(notification.params) || notification.method !== "rawResponseItem/completed") {
5287+return false;
5288+}
5289+const item = isJsonObject(notification.params.item) ? notification.params.item : undefined;
5290+return item ? readString(item, "type") === "reasoning" : false;
5291+}
5292+52775293function isAssistantCompletionReleaseNotification(
52785294notification: CodexServerNotification,
52795295turnCrossedToolHandoff: boolean,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。