You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactored exec approval timeout handling to improve code maintainability and clarity.
Centralized the 120-second default exec approval timeout as DEFAULT_EXEC_APPROVAL_TIMEOUT_MS constant, now shared between CLI and gateway
Replaced opts object mutation pattern with explicit transportTimeoutMs parameter to callGatewayCli, avoiding spread operator overhead and making intent clearer
Enhanced node:sqlite missing runtime error message to be more actionable for users
Updated all tests to reflect the new API signature with separate transport timeout parameter
Confidence Score: 5/5
This PR is safe to merge with minimal risk
Clean refactoring with comprehensive test coverage. The changes eliminate object mutation, centralize magic numbers into well-named constants, and maintain functional equivalence with the previous implementation. All tests have been updated to match the new API signature. The SQLite error improvement is a pure developer experience enhancement with no logic changes.
Medium Risk
Touches CLI↔gateway request timing and changes the callGatewayCli signature, so incorrect overrides or missed call sites could cause unexpected timeouts. The SQLite change is low risk and only affects error messaging when the module is unavailable.
Overview
Centralizes the exec-approval default timeout by introducing DEFAULT_EXEC_APPROVAL_TIMEOUT_MS and using it in both the CLI nodes run flow and the gateway exec.approval.request handler.
Refactors callGatewayCli to accept an optional per-call transportTimeoutMs override and updates nodes run to pass Math.max(userTimeout, approvalTimeout+10s) via this new parameter (instead of mutating opts.timeout), with regression tests updated accordingly.
Improves requireNodeSqlite() error handling by catching missing node:sqlite and throwing a clearer, actionable error message (preserving the original error as cause).
Written by Cursor Bugbot for commit 179ed55. This will update automatically on new commits. Configure here.
Centralizing exec approval timeout improves consistency. We set per‑tool defaults (e.g., shell: 300s, browser: 60s) and allow overrides per agent. Do you plan to make these configurable via agents.defaults.approvalTimeout?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up cleanup after #12188.
Changes:
node:sqliteruntime error message.Gate:
Greptile Overview
Greptile Summary
Refactored exec approval timeout handling to improve code maintainability and clarity.
DEFAULT_EXEC_APPROVAL_TIMEOUT_MSconstant, now shared between CLI and gatewaytransportTimeoutMsparameter tocallGatewayCli, avoiding spread operator overhead and making intent clearernode:sqlitemissing runtime error message to be more actionable for usersConfidence Score: 5/5
Last reviewed commit: 179ed55