Skip to content

Commit 50ff249

Browse files
authored
🤖 fix: correct web_fetch timeout unit (20000s → 20s) (#1054)
## Summary Fixes the `web_fetch` tool hanging indefinitely on network issues (#966). ## Root Cause The `Runtime.exec` timeout option expects **seconds**, but `web_fetch.ts` was multiplying by 1000 (treating it as milliseconds): ```typescript // BUG: This resulted in 20,000 seconds (~5.5 hours) instead of 20 seconds timeout: (WEB_FETCH_TIMEOUT_SECS + 5) * 1000 ``` ## Fix Remove the `* 1000` multiplication: ```typescript timeout: WEB_FETCH_TIMEOUT_SECS + 5 // 20 seconds ``` ## Testing - Typecheck passes - Lint passes Fixes #966 --- _Generated with `mux`_
1 parent bae51a7 commit 50ff249

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/node/services/tools/web_fetch.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const createWebFetchTool: ToolFactory = (config: ToolConfiguration) => {
112112
const result = await execBuffered(config.runtime, curlCommand, {
113113
cwd: config.cwd,
114114
abortSignal,
115-
timeout: (WEB_FETCH_TIMEOUT_SECS + 5) * 1000, // Slightly longer than curl's timeout
115+
timeout: WEB_FETCH_TIMEOUT_SECS + 5, // Slightly longer than curl's timeout (seconds)
116116
});
117117

118118
if (result.exitCode !== 0) {

0 commit comments

Comments
 (0)