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

推荐订阅源

N
Netflix TechBlog - Medium
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
爱范儿
爱范儿
博客园_首页
雷峰网
雷峰网
Hugging Face - Blog
Hugging Face - Blog
V
Visual Studio Blog
The Cloudflare Blog
罗磊的独立博客
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
大猫的无限游戏
大猫的无限游戏
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
博客园 - 叶小钗
The GitHub Blog
The GitHub Blog
Last Week in AI
Last Week in AI
J
Java Code Geeks
MyScale Blog
MyScale Blog
G
Google Developers Blog
U
Unit 42
Y
Y Combinator Blog
P
Proofpoint News Feed
Vercel News
Vercel News

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: explain stuck session diagnostics · openclaw/opencla...
steipete · 2026-04-30 · via Recent Commits to openclaw:main

@@ -24,6 +24,31 @@ function recoveryKey(params: StuckSessionRecoveryParams): string | undefined {

2424

return params.sessionKey?.trim() || params.sessionId?.trim() || undefined;

2525

}

262627+

function formatRecoveryContext(

28+

params: StuckSessionRecoveryParams,

29+

extra?: { activeSessionId?: string; lane?: string; activeCount?: number; queuedCount?: number },

30+

): string {

31+

const fields = [

32+

`sessionId=${params.sessionId ?? extra?.activeSessionId ?? "unknown"}`,

33+

`sessionKey=${params.sessionKey ?? "unknown"}`,

34+

`age=${Math.round(params.ageMs / 1000)}s`,

35+

`queueDepth=${params.queueDepth ?? 0}`,

36+

];

37+

if (extra?.activeSessionId) {

38+

fields.push(`activeSessionId=${extra.activeSessionId}`);

39+

}

40+

if (extra?.lane) {

41+

fields.push(`lane=${extra.lane}`);

42+

}

43+

if (extra?.activeCount !== undefined) {

44+

fields.push(`laneActive=${extra.activeCount}`);

45+

}

46+

if (extra?.queuedCount !== undefined) {

47+

fields.push(`laneQueued=${extra.queuedCount}`);

48+

}

49+

return fields.join(" ");

50+

}

51+2752

export async function recoverStuckDiagnosticSession(

2853

params: StuckSessionRecoveryParams,

2954

): Promise<void> {

@@ -51,12 +76,11 @@ export async function recoverStuckDiagnosticSession(

51765277

if (activeSessionId) {

5378

if (params.allowActiveAbort !== true) {

54-

diag.debug(

55-

`stuck session recovery skipped active abort: sessionId=${

56-

params.sessionId ?? activeSessionId

57-

} sessionKey=${params.sessionKey ?? "unknown"} age=${Math.round(

58-

params.ageMs / 1000,

59-

)}s queueDepth=${params.queueDepth ?? 0}`,

79+

diag.warn(

80+

`stuck session recovery skipped: reason=active_embedded_run action=observe_only ${formatRecoveryContext(

81+

params,

82+

{ activeSessionId },

83+

)}`,

6084

);

6185

return;

6286

}

@@ -72,21 +96,27 @@ export async function recoverStuckDiagnosticSession(

7296

}

73977498

if (!activeSessionId && activeWorkSessionId && isEmbeddedPiRunActive(activeWorkSessionId)) {

75-

diag.debug(

76-

`stuck session recovery skipped lane reset: active reply work sessionId=${activeWorkSessionId} sessionKey=${

77-

params.sessionKey ?? "unknown"

78-

} age=${Math.round(params.ageMs / 1000)}s queueDepth=${params.queueDepth ?? 0}`,

99+

diag.warn(

100+

`stuck session recovery skipped: reason=active_reply_work action=keep_lane ${formatRecoveryContext(

101+

params,

102+

{ activeSessionId: activeWorkSessionId },

103+

)}`,

79104

);

80105

return;

81106

}

8210783108

if (!activeSessionId && sessionLane) {

84109

const laneSnapshot = getCommandLaneSnapshot(sessionLane);

85110

if (laneSnapshot.activeCount > 0) {

86-

diag.debug(

87-

`stuck session recovery skipped lane reset: active lane task lane=${sessionLane} active=${laneSnapshot.activeCount} queued=${laneSnapshot.queuedCount} sessionId=${

88-

params.sessionId ?? "unknown"

89-

} sessionKey=${params.sessionKey ?? "unknown"} age=${Math.round(params.ageMs / 1000)}s`,

111+

diag.warn(

112+

`stuck session recovery skipped: reason=active_lane_task action=keep_lane ${formatRecoveryContext(

113+

params,

114+

{

115+

lane: sessionLane,

116+

activeCount: laneSnapshot.activeCount,

117+

queuedCount: laneSnapshot.queuedCount,

118+

},

119+

)}`,

90120

);

91121

return;

92122

}

@@ -101,6 +131,15 @@ export async function recoverStuckDiagnosticSession(

101131

params.sessionKey ?? "unknown"

102132

} age=${Math.round(params.ageMs / 1000)}s aborted=${aborted} drained=${drained} released=${released}`,

103133

);

134+

} else {

135+

diag.warn(

136+

`stuck session recovery no-op: reason=no_active_work action=none ${formatRecoveryContext(

137+

params,

138+

{

139+

lane: sessionLane ?? undefined,

140+

},

141+

)}`,

142+

);

104143

}

105144

} catch (err) {

106145

diag.warn(