fix(codex): raise dynamic tool timeout · openclaw/openclaw@0f18d52
udaymanish6
·
2026-05-27
·
via Recent Commits to openclaw:main
File tree
extensions/codex/src/app-server
| Original file line number | Diff line number | Diff line change |
|---|
@@ -310,7 +310,7 @@ available timeout in this order:
|
310 | 310 | image-generation default. |
311 | 311 | - For the media-understanding `image` tool, `tools.media.image.timeoutSeconds` |
312 | 312 | converted to milliseconds, or the 60 second media default. |
313 | | -- The 30 second dynamic-tool default. |
| 313 | +- The 90 second dynamic-tool default. |
314 | 314 | |
315 | 315 | Dynamic tool budgets are capped at 600000 ms. On timeout, OpenClaw aborts the |
316 | 316 | tool signal where supported and returns a failed dynamic-tool response to Codex |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -541,7 +541,7 @@ Supported `appServer` fields:
|
541 | 541 | | `experimental.sandboxExecServer` | `false` | Preview opt-in that registers an OpenClaw sandbox-backed Codex environment with Codex app-server 0.132.0 or newer so native Codex execution can run inside the active OpenClaw sandbox. | |
542 | 542 | |
543 | 543 | OpenClaw-owned dynamic tool calls are bounded independently from |
544 | | -`appServer.requestTimeoutMs`: Codex `item/tool/call` requests use a 30 second |
| 544 | +`appServer.requestTimeoutMs`: Codex `item/tool/call` requests use a 90 second |
545 | 545 | OpenClaw watchdog by default. A positive per-call `timeoutMs` argument extends |
546 | 546 | or shortens that specific tool budget. The `image_generate` tool uses |
547 | 547 | `agents.defaults.imageGenerationModel.timeoutMs` when the tool call does not |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3089,6 +3089,22 @@ describe("runCodexAppServerAttempt", () => {
|
3089 | 3089 | ).toBe(testing.CODEX_DYNAMIC_MESSAGE_TOOL_TIMEOUT_MS); |
3090 | 3090 | }); |
3091 | 3091 | |
| 3092 | +it("uses a 90 second default for generic Codex dynamic tool calls", () => { |
| 3093 | +expect( |
| 3094 | +testing.resolveDynamicToolCallTimeoutMs({ |
| 3095 | +call: { |
| 3096 | +threadId: "thread-1", |
| 3097 | +turnId: "turn-1", |
| 3098 | +callId: "call-session-status", |
| 3099 | +namespace: null, |
| 3100 | +tool: "session_status", |
| 3101 | +arguments: { sessionKey: "current" }, |
| 3102 | +}, |
| 3103 | +config: undefined, |
| 3104 | +}), |
| 3105 | +).toBe(90_000); |
| 3106 | +}); |
| 3107 | + |
3092 | 3108 | it("caps dynamic tool timeouts at the bridge maximum", () => { |
3093 | 3109 | expect( |
3094 | 3110 | testing.resolveDynamicToolCallTimeoutMs({ |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -207,7 +207,7 @@ import {
|
207 | 207 | import { createCodexUserInputBridge } from "./user-input-bridge.js"; |
208 | 208 | import { filterToolsForVisionInputs } from "./vision-tools.js"; |
209 | 209 | |
210 | | -const CODEX_DYNAMIC_TOOL_TIMEOUT_MS = 30_000; |
| 210 | +const CODEX_DYNAMIC_TOOL_TIMEOUT_MS = 90_000; |
211 | 211 | const CODEX_DYNAMIC_TOOL_MAX_TIMEOUT_MS = 600_000; |
212 | 212 | const CODEX_DYNAMIC_IMAGE_GENERATION_TOOL_TIMEOUT_MS = 120_000; |
213 | 213 | const CODEX_DYNAMIC_IMAGE_TOOL_TIMEOUT_MS = 60_000; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1178,6 +1178,21 @@ describe("runCodexAppServerSideQuestion", () => {
|
1178 | 1178 | expect(timeoutMs).toBe(120_000); |
1179 | 1179 | }); |
1180 | 1180 | |
| 1181 | +it("uses a 90 second default for generic side-thread dynamic tool calls", () => { |
| 1182 | +const timeoutMs = testing.resolveSideDynamicToolCallTimeoutMs({ |
| 1183 | +call: { |
| 1184 | +threadId: "side-thread", |
| 1185 | +turnId: "turn-1", |
| 1186 | +callId: "tool-1", |
| 1187 | +tool: "session_status", |
| 1188 | +arguments: { sessionKey: "current" }, |
| 1189 | +}, |
| 1190 | +config: {} as never, |
| 1191 | +}); |
| 1192 | + |
| 1193 | +expect(timeoutMs).toBe(90_000); |
| 1194 | +}); |
| 1195 | + |
1181 | 1196 | it("cleans up notification handlers when side tool setup fails", async () => { |
1182 | 1197 | const client = createFakeClient(); |
1183 | 1198 | createOpenClawCodingToolsMock.mockImplementation(() => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -78,7 +78,7 @@ import {
|
78 | 78 | } from "./thread-lifecycle.js"; |
79 | 79 | import { filterToolsForVisionInputs } from "./vision-tools.js"; |
80 | 80 | |
81 | | -const CODEX_SIDE_DYNAMIC_TOOL_TIMEOUT_MS = 30_000; |
| 81 | +const CODEX_SIDE_DYNAMIC_TOOL_TIMEOUT_MS = 90_000; |
82 | 82 | const CODEX_SIDE_DYNAMIC_TOOL_MAX_TIMEOUT_MS = 600_000; |
83 | 83 | const CODEX_SIDE_DYNAMIC_IMAGE_GENERATION_TOOL_TIMEOUT_MS = 120_000; |
84 | 84 | const CODEX_SIDE_DYNAMIC_IMAGE_TOOL_TIMEOUT_MS = 60_000; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。