












@@ -213,6 +213,7 @@ const CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS = 5_000;
213213const CODEX_USAGE_LIMIT_RATE_LIMIT_REFRESH_TIMEOUT_MS = 5_000;
214214const CODEX_TURN_COMPLETION_IDLE_TIMEOUT_MS = 60_000;
215215const CODEX_TURN_ASSISTANT_COMPLETION_IDLE_TIMEOUT_MS = 10_000;
216+const CODEX_POST_REASONING_SOURCE_REPLY_IDLE_TIMEOUT_MS = 5 * 60_000;
216217const CODEX_TURN_TERMINAL_IDLE_TIMEOUT_MS = 30 * 60_000;
217218const CODEX_NATIVE_HOOK_RELAY_MIN_TTL_MS = 30 * 60_000;
218219const CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS = 5 * 60_000;
@@ -2405,13 +2406,18 @@ export async function runCodexAppServerAttempt(
24052406turnCrossedToolHandoff &&
24062407isRawAssistantCompletionNotification(notification) &&
24072408activeTurnItemIds.size === 0;
2409+const shouldArmPostReasoningSourceReplyWatch =
2410+isCurrentTurnNotification &&
2411+isReasoningItemCompletionNotification(notification) &&
2412+activeTurnItemIds.size === 0 &&
2413+params.sourceReplyDeliveryMode === "message_tool_only";
24082414const shouldRearmCompletionIdleWatchAfterLastCurrentTurnItem =
24092415isCurrentTurnNotification &&
24102416notification.method === "item/completed" &&
24112417activeTurnItemIds.size === 0 &&
24122418!trackedDynamicToolCompletion &&
24132419!assistantCompletionCanRelease &&
2414-!isReasoningItemCompletionNotification(notification);
2420+!shouldArmPostReasoningSourceReplyWatch;
24152421if (isCurrentTurnNotification && notification.method === "error") {
24162422if (isRetryableErrorNotification(notification.params)) {
24172423disarmTurnCompletionIdleWatch();
@@ -2425,6 +2431,8 @@ export async function runCodexAppServerAttempt(
24252431armTurnAssistantCompletionIdleWatch(describeNotificationActivity(notification));
24262432} else if (postToolRawAssistantCompletionNeedsTerminalGuard) {
24272433armTurnCompletionIdleWatch({ timeoutMs: postToolRawAssistantCompletionIdleTimeoutMs });
2434+} else if (shouldArmPostReasoningSourceReplyWatch) {
2435+armTurnCompletionIdleWatch({ timeoutMs: CODEX_POST_REASONING_SOURCE_REPLY_IDLE_TIMEOUT_MS });
24282436} else if (unblockedAssistantCompletionRelease) {
24292437armTurnAssistantCompletionIdleWatch(describeNotificationActivity(notification));
24302438} else if (shouldRearmCompletionIdleWatchAfterLastCurrentTurnItem) {
@@ -2450,6 +2458,7 @@ export async function runCodexAppServerAttempt(
24502458!trackedDynamicToolCompletion &&
24512459!rawToolOutputCompletion &&
24522460!postToolRawAssistantCompletionNeedsTerminalGuard &&
2461+!shouldArmPostReasoningSourceReplyWatch &&
24532462!shouldRearmCompletionIdleWatchAfterLastCurrentTurnItem
24542463) {
24552464// The short completion-idle watchdog guards blind gaps after Codex
此內容由慣性聚合(RSS閱讀器)自動聚合整理,僅供閱讀參考。 原文來自 — 版權歸原作者所有。