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

推荐订阅源

Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
I
InfoQ
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
人人都是产品经理
人人都是产品经理
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
MongoDB | Blog
MongoDB | Blog
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
量子位
美团技术团队
大猫的无限游戏
大猫的无限游戏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Last Week in AI
Last Week in AI
博客园 - 司徒正美
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
小众软件
小众软件
C
Check Point Blog
博客园 - 三生石上(FineUI控件)
N
Netflix TechBlog - Medium
Recent Announcements
Recent Announcements
有赞技术团队
有赞技术团队
月光博客
月光博客

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(agent-reply): surface CLI subprocess timeouts in user...
neeravmakwan · 2026-05-06 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -377,6 +377,7 @@ Docs: https://docs.openclaw.ai

377377

- Web fetch: late-bind `web_fetch` config and provider fallback metadata from the active runtime snapshot, matching `web_search` so long-lived tools do not use stale fetch provider settings. Thanks @vincentkoc.

378378

- Plugins/discovery: demote the source-only TypeScript runtime check on already-installed `origin: "global"` plugin packages from a config-blocking error to a warning and let the runtime fall through to the TypeScript source via jiti, so a single broken installed package no longer blocks `plugins install` for unrelated plugins; install-time rejection of newly-installed source-only packages is unchanged. Thanks @romneyda.

379379

- Providers/OpenAI Codex: stop the OAuth progress spinner before showing the manual redirect paste prompt, so callback timeouts do not spam `Browser callback did not finish` across terminals.

380+

- Agents/messaging: surface CLI subprocess watchdog/turn timeout messages to chat users when verbose failures are off, instead of collapsing them into generic external-run failure copy. Fixes #77007.

380381

- Channels/WhatsApp: allow `@whiskeysockets/libsignal-node` in `onlyBuiltDependencies` so pnpm v9+ `blockExoticSubdeps` no longer rejects the baileys git-tarball subdep and silences all inbound agent replies. Fixes #76539. Thanks @ottodeng and @vincentkoc.

381382

- Gateway/systemd: preserve operator-added secrets in the Gateway env file across re-stage while clearing OpenClaw-managed keys (such as `OPENCLAW_GATEWAY_TOKEN`) so a fresh staging value is never shadowed by a stale env-file copy; operator secrets are also retained when the state-dir `.env` is empty. Fixes #76860. Thanks @hclsys.

382383

- Plugin updates: do not short-circuit trusted official npm updates as unchanged when the default/latest spec still resolves to an already-installed prerelease that the installer should replace with a stable fallback. Thanks @vincentkoc.

Original file line numberDiff line numberDiff line change

@@ -2364,6 +2364,55 @@ describe("runAgentTurnWithFallback", () => {

23642364

}

23652365

});

23662366
2367+

it.each([

2368+

{

2369+

rejection: new Error("CLI exceeded timeout (300s) and was terminated."),

2370+

modeLabel: "overall CLI turn budget" as const,

2371+

routingSubstring: undefined as string | undefined,

2372+

},

2373+

{

2374+

rejection: new Error("CLI produced no output for 120s and was terminated."),

2375+

modeLabel: "no-output stall" as const,

2376+

routingSubstring: undefined,

2377+

},

2378+

{

2379+

rejection: new Error(

2380+

"All models failed (2): anthropic/claude-opus-4-7: CLI exceeded timeout (300s) and was terminated. | anthropic/foo: bar",

2381+

),

2382+

modeLabel: "overall CLI turn budget" as const,

2383+

routingSubstring: "(routing anthropic/claude-opus-4-7)",

2384+

},

2385+

{

2386+

rejection: new Error("codex-cli/gpt-5.5: CLI exceeded timeout (60s) and was terminated."),

2387+

modeLabel: "overall CLI turn budget" as const,

2388+

routingSubstring: "(routing codex-cli/gpt-5.5)",

2389+

},

2390+

])(

2391+

"surfaces CLI subprocess timeout copy instead of generic failure when verbose is off ($modeLabel)",

2392+

async ({ rejection, modeLabel, routingSubstring }) => {

2393+

state.runWithModelFallbackMock.mockRejectedValueOnce(rejection);

2394+
2395+

const runAgentTurnWithFallback = await getRunAgentTurnWithFallback();

2396+

const result = await runAgentTurnWithFallback({

2397+

...createMinimalRunAgentTurnParams(),

2398+

});

2399+
2400+

expect(result.kind).toBe("final");

2401+

if (result.kind !== "final") {

2402+

throw new Error("expected final reply");

2403+

}

2404+

expect(result.payload.text).not.toBe(GENERIC_RUN_FAILURE_TEXT);

2405+

expect(result.payload.text).toContain("CLI subprocess");

2406+

expect(result.payload.text).not.toContain("Claude CLI");

2407+

expect(result.payload.text).toContain(modeLabel);

2408+

expect(result.payload.text).toContain("gateway may still be healthy");

2409+

expect(result.payload.text).toContain("cliBackends.<your-runtime>");

2410+

if (routingSubstring) {

2411+

expect(result.payload.text).toContain(routingSubstring);

2412+

}

2413+

},

2414+

);

2415+
23672416

it("forwards sanitized generic errors on external chat channels when verbose is on", async () => {

23682417

state.runEmbeddedPiAgentMock.mockRejectedValueOnce(

23692418

new Error("INVALID_ARGUMENT: some other failure"),

Original file line numberDiff line numberDiff line change

@@ -433,6 +433,30 @@ function resolveExternalRunFailureTextForConversation(params: {

433433

return SILENT_REPLY_TOKEN;

434434

}

435435
436+

const CLI_BACKEND_NO_OUTPUT_STALL_RE =

437+

/\bCLI produced no output for\s+(\d+)\s*s\s+and was terminated\b/iu;

438+

const CLI_BACKEND_OVERALL_TIMEOUT_RE =

439+

/\bCLI exceeded timeout\s*\(\s*(\d+)\s*s\s*\)\s+and was terminated\b/iu;

440+

const CLI_BACKEND_ROUTING_REF_BEFORE_ERROR_RE = /\b([\w.-]+\/[A-Za-z][\w.-]*)\s*:\s*CLI\b/iu;

441+
442+

function buildCliBackendTimeoutFailureText(message: string): string | null {

443+

const normalizedMessage = collapseRepeatedFailureDetail(message);

444+

const stall = normalizedMessage.match(CLI_BACKEND_NO_OUTPUT_STALL_RE);

445+

const overall = normalizedMessage.match(CLI_BACKEND_OVERALL_TIMEOUT_RE);

446+

const timeout = stall ?? overall;

447+

const seconds = timeout?.[1];

448+

if (!seconds) {

449+

return null;

450+

}

451+

const routedModelRef = normalizedMessage.match(CLI_BACKEND_ROUTING_REF_BEFORE_ERROR_RE)?.[1];

452+

const routingSuffix = routedModelRef ? ` (routing ${routedModelRef})` : "";

453+

const modeLabel = stall ? "no-output stall" : "overall CLI turn budget";

454+

return (

455+

`⚠️ CLI subprocess${routingSuffix}: timed out after ${seconds}s (${modeLabel}). The gateway may still be healthy. Try \`/new\`, a lighter model, or raise ` +

456+

"`agents.defaults.timeoutSeconds` and the watchdog `noOutputTimeoutMs` entries under `cliBackends.<your-runtime>`."

457+

);

458+

}

459+
436460

function buildMissingApiKeyFailureText(message: string): string | null {

437461

const normalizedMessage = collapseRepeatedFailureDetail(message);

438462

const providerMatch = normalizedMessage.match(/No API key found for provider "([^"]+)"/u);

@@ -494,6 +518,10 @@ function buildExternalRunFailureReply(

494518

isGenericRunnerFailure: false,

495519

};

496520

}

521+

const cliBackendTimeoutFailure = buildCliBackendTimeoutFailureText(normalizedMessage);

522+

if (cliBackendTimeoutFailure) {

523+

return { text: cliBackendTimeoutFailure, isGenericRunnerFailure: false };

524+

}

497525

return {

498526

text: options?.includeDetails

499527

? formatForwardedExternalRunFailureText(normalizedMessage)