getShellMaxTimeoutMs
getShellMaxTimeoutMs(
devTools):number
Defined in: packages/core/src/config/shell-policy.ts:492
EXT-125 — resolve the CEILING (ms) on a time budget a shell tool call may ask for in its
timeoutMs argument. Only the object form can override it; non-positive / non-finite values are
ignored, exactly as getShellTimeoutMs treats timeout.
Never below getShellTimeoutMs, and that clamp is the point. The budget a call gets for asking nothing is already granted to every command, so a ceiling under it would mean a model asking for a legal-looking number got LESS time than staying silent would have given it, and its repair move would be to stop naming a budget — the opposite of what the argument exists for. The rule is therefore: naming a budget can never leave a call worse off than not naming one.
The case that reads oddly and is nonetheless correct: { "maxTimeout": 60000 } with no
timeout resolves to 120000, not 60000. The user has already granted every command 120 s by
leaving the default in place; a 60 s ceiling on top of that forbids nothing. A user who means
“no command may run longer than a minute” sets timeout as well, and then the ceiling holds at
60000 because the max of the two is 60000. A user who means “the model may not raise the budget
at all” sets maxTimeout equal to timeout.
What this guarantees is the safety property the argument needs: the ceiling is a function of CONFIG alone — the larger of the user’s explicit ceiling and the budget the user already grants by default — and never of anything the model sent. So no sequence of tool calls can widen it, and a model cannot grant itself wall-clock the user had not already granted every command.
Parameters
Section titled “Parameters”devTools
Section titled “devTools”GthDevToolsConfig | undefined
Returns
Section titled “Returns”number