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

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
Recent Announcements
Recent Announcements
L
LangChain Blog
B
Blog
阮一峰的网络日志
阮一峰的网络日志
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
M
MIT News - Artificial intelligence
D
Docker
WordPress大学
WordPress大学
J
Java Code Geeks
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The GitHub Blog
The GitHub Blog
博客园 - 叶小钗
Last Week in AI
Last Week in AI
Stack Overflow Blog
Stack Overflow Blog
有赞技术团队
有赞技术团队
MyScale Blog
MyScale Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MongoDB | Blog
MongoDB | Blog
博客园 - Franky

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(codex): guard post-tool raw assistant terminal gaps (...
joshavant · 2026-05-17 · via Recent Commits to openclaw:main

@@ -1060,6 +1060,7 @@ export async function runCodexAppServerAttempt(

10601060

let turnCompletionIdleTimer: ReturnType<typeof setTimeout> | undefined;

10611061

let turnCompletionIdleWatchArmed = false;

10621062

let turnCompletionIdleWatchPinnedByTerminalError = false;

1063+

let turnCompletionIdleTimeoutOverrideMs: number | undefined;

10631064

let turnAssistantCompletionIdleTimer: ReturnType<typeof setTimeout> | undefined;

10641065

let turnAssistantCompletionIdleWatchArmed = false;

10651066

let turnAssistantCompletionLastActivityAt = Date.now();

@@ -1195,8 +1196,9 @@ export async function runCodexAppServerAttempt(

11951196

) {

11961197

return;

11971198

}

1199+

const timeoutMs = turnCompletionIdleTimeoutOverrideMs ?? turnCompletionIdleTimeoutMs;

11981200

const idleMs = Math.max(0, Date.now() - turnCompletionLastActivityAt);

1199-

if (idleMs < turnCompletionIdleTimeoutMs) {

1201+

if (idleMs < timeoutMs) {

12001202

scheduleTurnCompletionIdleWatch();

12011203

return;

12021204

}

@@ -1209,15 +1211,15 @@ export async function runCodexAppServerAttempt(

12091211

threadId: thread.threadId,

12101212

turnId,

12111213

idleMs,

1212-

timeoutMs: turnCompletionIdleTimeoutMs,

1214+

timeoutMs,

12131215

lastActivityReason: turnCompletionLastActivityReason,

12141216

...turnCompletionLastActivityDetails,

12151217

});

12161218

embeddedAgentLog.warn("codex app-server turn idle timed out waiting for completion", {

12171219

threadId: thread.threadId,

12181220

turnId,

12191221

idleMs,

1220-

timeoutMs: turnCompletionIdleTimeoutMs,

1222+

timeoutMs,

12211223

lastActivityReason: turnCompletionLastActivityReason,

12221224

...turnCompletionLastActivityDetails,

12231225

});

@@ -1273,7 +1275,8 @@ export async function runCodexAppServerAttempt(

12731275

return;

12741276

}

12751277

const elapsedMs = Math.max(0, Date.now() - turnCompletionLastActivityAt);

1276-

const delayMs = Math.max(1, turnCompletionIdleTimeoutMs - elapsedMs);

1278+

const timeoutMs = turnCompletionIdleTimeoutOverrideMs ?? turnCompletionIdleTimeoutMs;

1279+

const delayMs = Math.max(1, timeoutMs - elapsedMs);

12771280

turnCompletionIdleTimer = setTimeout(fireTurnCompletionIdleTimeout, delayMs);

12781281

turnCompletionIdleTimer.unref?.();

12791282

}

@@ -1351,6 +1354,7 @@ export async function runCodexAppServerAttempt(

13511354

turnCompletionLastActivityAt = Date.now();

13521355

turnCompletionLastActivityReason = reason;

13531356

turnCompletionLastActivityDetails = options?.details;

1357+

turnCompletionIdleTimeoutOverrideMs = undefined;

13541358

if (options?.attemptProgress) {

13551359

turnAttemptLastProgressAt = turnCompletionLastActivityAt;

13561360

turnAttemptLastProgressReason = reason;

@@ -1380,6 +1384,7 @@ export async function runCodexAppServerAttempt(

13801384

const disarmTurnCompletionIdleWatch = () => {

13811385

turnCompletionIdleWatchArmed = false;

13821386

turnCompletionIdleWatchPinnedByTerminalError = false;

1387+

turnCompletionIdleTimeoutOverrideMs = undefined;

13831388

clearTurnCompletionIdleTimer();

13841389

};

13851390

@@ -1396,9 +1401,14 @@ export async function runCodexAppServerAttempt(

13961401

scheduleTurnAssistantCompletionIdleWatch();

13971402

};

139814031399-

const armTurnCompletionIdleWatch = (options?: { pinnedByTerminalError?: boolean }) => {

1404+

const armTurnCompletionIdleWatch = (options?: {

1405+

pinnedByTerminalError?: boolean;

1406+

timeoutMs?: number;

1407+

}) => {

14001408

turnCompletionIdleWatchArmed = true;

14011409

turnCompletionIdleWatchPinnedByTerminalError = options?.pinnedByTerminalError === true;

1410+

turnCompletionIdleTimeoutOverrideMs =

1411+

options?.timeoutMs !== undefined ? Math.max(1, Math.floor(options.timeoutMs)) : undefined;

14021412

scheduleTurnCompletionIdleWatch();

14031413

};

14041414

@@ -1520,6 +1530,11 @@ export async function runCodexAppServerAttempt(

15201530

notification,

15211531

turnCrossedToolHandoff,

15221532

);

1533+

const postToolRawAssistantCompletionNeedsTerminalGuard =

1534+

isCurrentTurnNotification &&

1535+

turnCrossedToolHandoff &&

1536+

isRawAssistantCompletionNotification(notification) &&

1537+

activeTurnItemIds.size === 0;

15231538

const shouldRearmCompletionIdleWatchAfterLastCurrentTurnItem =

15241539

isCurrentTurnNotification &&

15251540

notification.method === "item/completed" &&

@@ -1537,6 +1552,8 @@ export async function runCodexAppServerAttempt(

15371552

disarmTurnAssistantCompletionIdleWatch();

15381553

} else if (isCurrentTurnNotification && assistantCompletionCanRelease) {

15391554

armTurnAssistantCompletionIdleWatch(describeNotificationActivity(notification));

1555+

} else if (postToolRawAssistantCompletionNeedsTerminalGuard) {

1556+

armTurnCompletionIdleWatch({ timeoutMs: turnAssistantCompletionIdleTimeoutMs });

15401557

} else if (unblockedAssistantCompletionRelease) {

15411558

armTurnAssistantCompletionIdleWatch(describeNotificationActivity(notification));

15421559

} else if (shouldRearmCompletionIdleWatchAfterLastCurrentTurnItem) {

@@ -1561,6 +1578,7 @@ export async function runCodexAppServerAttempt(

15611578

isCurrentTurnNotification &&

15621579

!trackedDynamicToolCompletion &&

15631580

!rawToolOutputCompletion &&

1581+

!postToolRawAssistantCompletionNeedsTerminalGuard &&

15641582

!shouldRearmCompletionIdleWatchAfterLastCurrentTurnItem

15651583

) {

15661584

// The short completion-idle watchdog guards blind gaps after Codex