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

推荐订阅源

Martin Fowler
Martin Fowler
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
A
About on SuperTechFans
Vercel News
Vercel News
L
LangChain Blog
B
Blog RSS Feed
Y
Y Combinator Blog
IT之家
IT之家
H
Hackread – Cybersecurity News, Data Breaches, AI and More
GbyAI
GbyAI
V
V2EX
博客园 - 三生石上(FineUI控件)
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
阮一峰的网络日志
阮一峰的网络日志
有赞技术团队
有赞技术团队
D
Docker
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
Last Week in AI
Last Week in AI
月光博客
月光博客

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): cap approval gateway timeouts · openclaw/open...
steipete · 2026-05-30 · via Recent Commits to openclaw:main

File tree

  • extensions/codex/src/app-server

Original file line numberDiff line numberDiff line change

@@ -7,6 +7,7 @@ import {

77

CODEX_TURN_COMPLETION_IDLE_TIMEOUT_MS,

88

CODEX_TURN_TERMINAL_IDLE_TIMEOUT_MS,

99

resolveCodexPostToolRawAssistantCompletionIdleTimeoutMs,

10+

resolveCodexGatewayTimeoutWithGraceMs,

1011

resolveCodexStartupTimeoutMs,

1112

resolveCodexTurnAssistantCompletionIdleTimeoutMs,

1213

resolveCodexTurnCompletionIdleTimeoutMs,

@@ -110,6 +111,17 @@ describe("Codex app-server attempt timeouts", () => {

110111

);

111112

});

112113
114+

it("caps gateway timeout grace", () => {

115+

expect(resolveCodexGatewayTimeoutWithGraceMs(120_000)).toBe(130_000);

116+

expect(resolveCodexGatewayTimeoutWithGraceMs(120_000, 500)).toBe(120_500);

117+

expect(resolveCodexGatewayTimeoutWithGraceMs(Number.MAX_SAFE_INTEGER)).toBe(

118+

MAX_TIMER_TIMEOUT_MS,

119+

);

120+

expect(resolveCodexGatewayTimeoutWithGraceMs(MAX_TIMER_TIMEOUT_MS - 100, 500)).toBe(

121+

MAX_TIMER_TIMEOUT_MS,

122+

);

123+

});

124+
113125

it("returns the startup operation result before timeout", async () => {

114126

await expect(

115127

withCodexStartupTimeout({

Original file line numberDiff line numberDiff line change

@@ -104,3 +104,9 @@ export function resolveCodexPostToolRawAssistantCompletionIdleTimeoutMs(

104104

export function resolveCodexTurnTerminalIdleTimeoutMs(value: number | undefined): number {

105105

return resolvePositiveIntegerTimeoutMs(value, CODEX_TURN_TERMINAL_IDLE_TIMEOUT_MS);

106106

}

107+
108+

export function resolveCodexGatewayTimeoutWithGraceMs(timeoutMs: number, graceMs = 10_000): number {

109+

const timeout = resolvePositiveIntegerTimeoutMs(timeoutMs, 1);

110+

const grace = resolveTimerTimeoutMs(graceMs, 0, 0);

111+

return resolveTimerTimeoutMs(timeout + grace, timeout);

112+

}

Original file line numberDiff line numberDiff line change

@@ -2,6 +2,7 @@ import {

22

callGatewayTool,

33

type EmbeddedRunAttemptParams,

44

} from "openclaw/plugin-sdk/agent-harness-runtime";

5+

import { resolveCodexGatewayTimeoutWithGraceMs } from "./attempt-timeouts.js";

56
67

const DEFAULT_CODEX_APPROVAL_TIMEOUT_MS = 120_000;

78

const MAX_PLUGIN_APPROVAL_TITLE_LENGTH = 80;

@@ -37,7 +38,7 @@ export async function requestPluginApproval(params: {

3738

const timeoutMs = DEFAULT_CODEX_APPROVAL_TIMEOUT_MS;

3839

return callGatewayTool(

3940

"plugin.approval.request",

40-

{ timeoutMs: timeoutMs + 10_000 },

41+

{ timeoutMs: resolveCodexGatewayTimeoutWithGraceMs(timeoutMs) },

4142

{

4243

pluginId: "openclaw-codex-app-server",

4344

title: truncateForGateway(params.title, MAX_PLUGIN_APPROVAL_TITLE_LENGTH),

@@ -78,7 +79,7 @@ export async function waitForPluginApprovalDecision(params: {

7879

const timeoutMs = DEFAULT_CODEX_APPROVAL_TIMEOUT_MS;

7980

const waitPromise: Promise<ApprovalWaitResult | undefined> = callGatewayTool(

8081

"plugin.approval.waitDecision",

81-

{ timeoutMs: timeoutMs + 10_000 },

82+

{ timeoutMs: resolveCodexGatewayTimeoutWithGraceMs(timeoutMs) },

8283

{ id: params.approvalId },

8384

);

8485

if (!params.signal) {