← Back to PRs

#11416: fix: clamp timeout values to avoid 32-bit overflow warning

by seojoonkim open 2026-02-07 19:47 View on GitHub →
agents
Fixes TimeoutOverflowWarning by clamping timeout values to MAX_SAFE_TIMEOUT_MS (2147483647). <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR updates agent timeout normalization to avoid Node.js `TimeoutOverflowWarning` by clamping all computed timeout values to the maximum safe `setTimeout` duration (2,147,483,647 ms). It replaces the previous “no timeout” sentinel (30 days) with that maximum-safe value and ensures negative overrides (meaning “use default”) also get clamped. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk. - Change is narrowly scoped to timeout value normalization and consistently clamps all timeout paths to Node’s maximum safe `setTimeout` value, eliminating the overflow warning without altering behavior for typical (small) timeouts. - No files require special attention <!-- greptile_other_comments_section --> <sub>(4/5) You can add custom instructions or style guidelines for the agent [here](https://app.greptile.com/review/github)!</sub> <!-- /greptile_comment -->

Most Similar PRs