Skip to content

Commit 75263be

Browse files
fix(codex): increase timeoutSeconds watchdog headroom to 30s
10s headroom can be consumed by baseline work before sessions_send arms its inner agent.wait timer. 30s accounts for pre-work delays so the tool's structured { runId, sentBeforeError } result consistently wins. Co-Authored-By: Claude <[email protected]>
1 parent c26b616 commit 75263be

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎extensions/codex/src/app-server/dynamic-tool-execution.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ describe("dynamic tool execution helpers", () => {
6969
},
7070
config: undefined,
7171
}),
72-
).toBe(130_000);
72+
).toBe(150_000);
7373
});
7474

7575
it("prefers timeoutMs over timeoutSeconds when both are present", () => {

‎extensions/codex/src/app-server/dynamic-tool-execution.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ import {
2828
* Headroom added to timeoutSeconds-derived watchdog values so the tool's own
2929
* structured timeout (e.g. sessions_send returning { runId, sentBeforeError })
3030
* wins the race over the outer generic hard-timeout response.
31+
* 30s accounts for baseline work and inner-timer start delay before the tool
32+
* arms its own wait budget.
3133
*/
32-
const CODEX_DYNAMIC_TOOL_TIMEOUT_SECONDS_HEADROOM_MS = 10_000;
34+
const CODEX_DYNAMIC_TOOL_TIMEOUT_SECONDS_HEADROOM_MS = 30_000;
3335
/** Default timeout for Codex dynamic tool calls. */
3436
export const CODEX_DYNAMIC_TOOL_TIMEOUT_MS = 90_000;
3537
/** Hard cap for per-call Codex dynamic tool timeout overrides. */

‎extensions/codex/src/app-server/side-question.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2628,7 +2628,7 @@ describe("runCodexAppServerSideQuestion", () => {
26282628
config: {} as never,
26292629
});
26302630

2631-
expect(timeoutMs).toBe(130_000);
2631+
expect(timeoutMs).toBe(150_000);
26322632
});
26332633

26342634
it("prefers timeoutMs over timeoutSeconds when both are present on side-thread calls", () => {

‎extensions/codex/src/app-server/side-question.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,10 @@ import {
109109
* Headroom added to timeoutSeconds-derived watchdog values so the tool's own
110110
* structured timeout (e.g. sessions_send returning { runId, sentBeforeError })
111111
* wins the race over the outer generic hard-timeout response.
112+
* 30s accounts for baseline work and inner-timer start delay before the tool
113+
* arms its own wait budget.
112114
*/
113-
const CODEX_SIDE_DYNAMIC_TOOL_TIMEOUT_SECONDS_HEADROOM_MS = 10_000;
115+
const CODEX_SIDE_DYNAMIC_TOOL_TIMEOUT_SECONDS_HEADROOM_MS = 30_000;
114116
const CODEX_SIDE_DYNAMIC_TOOL_TIMEOUT_MS = 90_000;
115117
const CODEX_SIDE_DYNAMIC_TOOL_MAX_TIMEOUT_MS = 600_000;
116118
const CODEX_SIDE_DYNAMIC_IMAGE_GENERATION_TOOL_TIMEOUT_MS = 120_000;

0 commit comments

Comments
 (0)