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

推荐订阅源

J
Java Code Geeks
Google DeepMind News
Google DeepMind News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
腾讯CDC
A
About on SuperTechFans
Vercel News
Vercel News
I
InfoQ
阮一峰的网络日志
阮一峰的网络日志
月光博客
月光博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
S
SegmentFault 最新的问题
V
Visual Studio Blog
T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
博客园 - 【当耐特】
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
美团技术团队

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(agents): detect signaled local service exits · opencl...
vincentkoc · 2026-05-28 · via Recent Commits to openclaw:main

@@ -87,7 +87,8 @@ export async function ensureModelProviderLocalService(

87878888

try {

8989

if (

90-

managed.process?.exitCode === null &&

90+

managed.process &&

91+

!hasLocalServiceProcessExited(managed.process) &&

9192

(await probeHealth(healthUrl, healthHeaders, signal))

9293

) {

9394

return { release };

@@ -110,7 +111,7 @@ export async function ensureModelProviderLocalService(

110111

});

111112

}

112113

await waitForAbort(managed.starting, signal);

113-

if (!managed.process || managed.process.exitCode !== null) {

114+

if (!managed.process || hasLocalServiceProcessExited(managed.process)) {

114115

release();

115116

return undefined;

116117

}

@@ -232,7 +233,7 @@ async function startAndWaitForLocalService(params: {

232233

if (await probeHealth(healthUrl, healthHeaders, signal)) {

233234

return;

234235

}

235-

if (managed.process?.exitCode === null) {

236+

if (managed.process && !hasLocalServiceProcessExited(managed.process)) {

236237

log.info(`restarting unhealthy ${provider} local service`);

237238

await stopManagedProcessForRestart(managed, signal);

238239

}

@@ -321,7 +322,7 @@ function stopManagedService(key: string, managed: ManagedLocalService, reason: s

321322

managed.process = undefined;

322323

managed.lastExit = undefined;

323324

services.delete(key);

324-

if (child && child.exitCode === null) {

325+

if (child && !hasLocalServiceProcessExited(child)) {

325326

log.info(`stopping local model service: reason=${reason}`);

326327

child.kill("SIGTERM");

327328

}

@@ -334,12 +335,12 @@ async function stopManagedProcessForRestart(

334335

const child = managed.process;

335336

managed.process = undefined;

336337

managed.lastExit = undefined;

337-

if (!child || child.exitCode !== null) {

338+

if (!child || hasLocalServiceProcessExited(child)) {

338339

return;

339340

}

340341

child.kill("SIGTERM");

341342

await waitForChildExit(child, signal, DEFAULT_PROBE_TIMEOUT_MS);

342-

if (child.exitCode === null) {

343+

if (!hasLocalServiceProcessExited(child)) {

343344

child.kill("SIGKILL");

344345

await waitForChildExit(child, signal, DEFAULT_PROBE_TIMEOUT_MS);

345346

}

@@ -464,7 +465,7 @@ function waitForChildExit(

464465

signal: AbortSignal,

465466

timeoutMs: number,

466467

): Promise<void> {

467-

if (child.exitCode !== null) {

468+

if (hasLocalServiceProcessExited(child)) {

468469

return Promise.resolve();

469470

}

470471

throwIfAborted(signal);

@@ -490,3 +491,9 @@ function waitForChildExit(

490491

signal.addEventListener("abort", onAbort, { once: true });

491492

});

492493

}

494+495+

export function hasLocalServiceProcessExited(

496+

child: Pick<ChildProcess, "exitCode" | "signalCode">,

497+

): boolean {

498+

return child.exitCode !== null || child.signalCode !== null;

499+

}