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

推荐订阅源

Scott Helme
Scott Helme
N
Netflix TechBlog - Medium
AI
AI
Security Latest
Security Latest
GbyAI
GbyAI
P
Proofpoint News Feed
Y
Y Combinator Blog
A
Arctic Wolf
G
Google Developers Blog
U
Unit 42
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
Vulnerabilities – Threatpost
Know Your Adversary
Know Your Adversary
Cisco Talos Blog
Cisco Talos Blog
T
Tor Project blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
L
Lohrmann on Cybersecurity
C
CERT Recently Published Vulnerability Notes
C
Check Point Blog
B
Blog RSS Feed
The GitHub Blog
The GitHub Blog
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 【当耐特】
博客园 - Franky
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
C
Cisco Blogs
云风的 BLOG
云风的 BLOG
NISL@THU
NISL@THU
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Microsoft Security Blog
Microsoft Security Blog
T
The Blog of Author Tim Ferriss
阮一峰的网络日志
阮一峰的网络日志
Latest news
Latest news
L
LINUX DO - 最新话题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
美团技术团队
WordPress大学
WordPress大学
L
LangChain Blog
Stack Overflow Blog
Stack Overflow Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
The Hacker News
The Hacker News
Simon Willison's Weblog
Simon Willison's Weblog
V
V2EX
Project Zero
Project Zero
博客园_首页

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 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
fix(provider): honor Codex response timeouts · openclaw/openclaw@c20a055
vincentkoc · 2026-05-28 · via Recent Commits to openclaw:main

@@ -133,6 +133,52 @@ function sleep(ms: number, signal?: AbortSignal): Promise<void> {

133133

});

134134

}

135135136+

function resolveRequestTimeoutMs(options?: OpenAICodexResponsesOptions): number | undefined {

137+

const timeoutMs = options?.timeoutMs;

138+

return typeof timeoutMs === "number" && Number.isFinite(timeoutMs) && timeoutMs > 0

139+

? Math.floor(timeoutMs)

140+

: undefined;

141+

}

142+143+

function buildRequestSignal(

144+

baseSignal: AbortSignal | undefined,

145+

timeoutMs: number | undefined,

146+

): AbortSignal | undefined {

147+

if (timeoutMs === undefined) {

148+

return baseSignal;

149+

}

150+

const timeoutSignal = AbortSignal.timeout(timeoutMs);

151+

if (!baseSignal) {

152+

return timeoutSignal;

153+

}

154+

return AbortSignal.any([baseSignal, timeoutSignal]);

155+

}

156+157+

function isRequestTimeoutError(

158+

error: unknown,

159+

callerSignal: AbortSignal | undefined,

160+

requestSignal: AbortSignal | undefined,

161+

timeoutMs: number | undefined,

162+

): boolean {

163+

if (timeoutMs === undefined || callerSignal?.aborted || !requestSignal?.aborted) {

164+

return false;

165+

}

166+

if (!(error instanceof Error)) {

167+

return false;

168+

}

169+

return (

170+

error.name === "AbortError" ||

171+

error.name === "TimeoutError" ||

172+

error.message === "Request was aborted"

173+

);

174+

}

175+176+

function formatRequestTimeoutError(timeoutMs: number, cause: unknown): Error {

177+

return new Error(`Request timed out after ${timeoutMs}ms`, {

178+

cause: cause instanceof Error ? cause : undefined,

179+

});

180+

}

181+136182

// ============================================================================

137183

// Main Stream Function

138184

// ============================================================================

@@ -148,6 +194,8 @@ export const streamOpenAICodexResponses: StreamFunction<

148194

const stream = new AssistantMessageEventStream();

149195150196

void (async () => {

197+

let requestTimeoutMs: number | undefined;

198+

let activeSignal: AbortSignal | undefined;

151199

const output: AssistantMessage = {

152200

role: "assistant",

153201

content: [],

@@ -194,6 +242,10 @@ export const streamOpenAICodexResponses: StreamFunction<

194242

websocketRequestId,

195243

);

196244

const bodyJson = JSON.stringify(body);

245+

requestTimeoutMs = resolveRequestTimeoutMs(options);

246+

activeSignal = buildRequestSignal(options?.signal, requestTimeoutMs);

247+

const requestOptions =

248+

activeSignal === options?.signal ? options : { ...options, signal: activeSignal };

197249

const transport = options?.transport || "auto";

198250

const websocketDisabledForSession =

199251

transport === "auto" && isWebSocketSseFallbackActive(options?.sessionId);

@@ -214,10 +266,10 @@ export const streamOpenAICodexResponses: StreamFunction<

214266

() => {

215267

websocketStarted = true;

216268

},

217-

options,

269+

requestOptions,

218270

);

219271220-

if (options?.signal?.aborted) {

272+

if (activeSignal?.aborted) {

221273

throw new Error("Request was aborted");

222274

}

223275

stream.push({

@@ -228,7 +280,7 @@ export const streamOpenAICodexResponses: StreamFunction<

228280

stream.end();

229281

return;

230282

} catch (error) {

231-

const aborted = options?.signal?.aborted;

283+

const aborted = activeSignal?.aborted;

232284

if (aborted || isCodexNonTransportError(error)) {

233285

throw error;

234286

}

@@ -259,7 +311,7 @@ export const streamOpenAICodexResponses: StreamFunction<

259311

let lastError: Error | undefined;

260312261313

for (let attempt = 0; attempt <= MAX_RETRIES; attempt++) {

262-

if (options?.signal?.aborted) {

314+

if (activeSignal?.aborted) {

263315

throw new Error("Request was aborted");

264316

}

265317

@@ -268,7 +320,7 @@ export const streamOpenAICodexResponses: StreamFunction<

268320

method: "POST",

269321

headers: sseHeaders,

270322

body: bodyJson,

271-

signal: options?.signal,

323+

signal: activeSignal,

272324

});

273325

await options?.onResponse?.(

274326

{ status: response.status, headers: headersToRecord(response.headers) },

@@ -304,7 +356,7 @@ export const streamOpenAICodexResponses: StreamFunction<

304356

}

305357

}

306358307-

await sleep(delayMs, options?.signal);

359+

await sleep(delayMs, activeSignal);

308360

continue;

309361

}

310362

@@ -317,15 +369,24 @@ export const streamOpenAICodexResponses: StreamFunction<

317369

throw new Error(info.friendlyMessage || info.message);

318370

} catch (error) {

319371

if (error instanceof Error) {

372+

if (

373+

isRequestTimeoutError(error, options?.signal, activeSignal, requestTimeoutMs) &&

374+

requestTimeoutMs !== undefined

375+

) {

376+

throw formatRequestTimeoutError(requestTimeoutMs, error);

377+

}

320378

if (error.name === "AbortError" || error.message === "Request was aborted") {

321379

throw new Error("Request was aborted", { cause: error });

322380

}

381+

if (error.name === "TimeoutError" && requestTimeoutMs !== undefined) {

382+

throw new Error(`Request timed out after ${requestTimeoutMs}ms`, { cause: error });

383+

}

323384

}

324385

lastError = error instanceof Error ? error : new Error(String(error));

325386

// Network errors are retryable

326387

if (attempt < MAX_RETRIES && !lastError.message.includes("usage limit")) {

327388

const delayMs = BASE_DELAY_MS * 2 ** attempt;

328-

await sleep(delayMs, options?.signal);

389+

await sleep(delayMs, activeSignal);

329390

continue;

330391

}

331392

throw lastError;

@@ -343,7 +404,7 @@ export const streamOpenAICodexResponses: StreamFunction<

343404

stream.push({ type: "start", partial: output });

344405

await processStream(response, output, stream, model, options);

345406346-

if (options?.signal?.aborted) {

407+

if (activeSignal?.aborted) {

347408

throw new Error("Request was aborted");

348409

}

349410

@@ -354,12 +415,18 @@ export const streamOpenAICodexResponses: StreamFunction<

354415

});

355416

stream.end();

356417

} catch (error) {

418+

const normalizedError =

419+

isRequestTimeoutError(error, options?.signal, activeSignal, requestTimeoutMs) &&

420+

requestTimeoutMs !== undefined

421+

? formatRequestTimeoutError(requestTimeoutMs, error)

422+

: error;

357423

for (const block of output.content) {

358424

// partialJson is only a streaming scratch buffer; never persist it.

359425

delete (block as { partialJson?: string }).partialJson;

360426

}

361427

output.stopReason = options?.signal?.aborted ? "aborted" : "error";

362-

output.errorMessage = error instanceof Error ? error.message : String(error);

428+

output.errorMessage =

429+

normalizedError instanceof Error ? normalizedError.message : String(normalizedError);

363430

stream.push({ type: "error", reason: output.stopReason, error: output });

364431

stream.end();

365432

}

@@ -975,6 +1042,11 @@ async function connectWebSocket(

9751042

signal?.removeEventListener("abort", onAbort);

9761043

};

97710441045+

if (signal?.aborted) {

1046+

onAbort();

1047+

return;

1048+

}

1049+9781050

socket.addEventListener("open", onOpen);

9791051

socket.addEventListener("error", onError);

9801052

socket.addEventListener("close", onClose);

@@ -1374,6 +1446,9 @@ async function processWebSocketStream(

13741446

}

13751447

}

13761448

try {

1449+

if (options?.signal?.aborted) {

1450+

throw new Error("Request was aborted");

1451+

}

13771452

socket.send(JSON.stringify({ type: "response.create", ...requestBody }));

13781453

await processResponsesStream(

13791454

startWebSocketOutputOnFirstEvent(