Make bash foreground timeout configurable#3018
Conversation
|
Thanks — making the foreground bash timeout configurable is genuinely useful, and the implementation (config plumbing, One change before this can land: please keep 120s as the default rather than 0 (unlimited). Today every foreground bash command is capped at 120s, which is the safety net that lets the agent recover from a runaway command (an infinite loop, a blocking read) on its own. This PR makes The wrinkle is that a plain
So: default 120s, config overrides it, and explicit |
|
Updated in e0ba2a5. Changes made per review:
Validation rerun:
|
Keep the historical 120s foreground bash cap when tools.bash_timeout_seconds is omitted, while preserving explicit 0 as the opt-in unlimited setting.
e0ba2a5 to
1d36378
Compare
Fixes #2982
Summary
tools.bash_timeout_secondsis omitted.*intconfig plumbing so explicittools.bash_timeout_seconds = 0remains an opt-in unlimited setting, while positive values set a custom cap.Validation
D:\Go\go\bin\go.exe test ./internal/config -run 'TestBashTimeoutSeconds|TestRenderTOMLRoundTrips' -count=1 -vD:\Go\go\bin\go.exe test ./internal/tool/builtin -run 'TestBash(ForegroundTimeoutConfig|ExplicitZeroTimeoutDoesNotCapForeground|CancelReturnsPromptly)|TestWorkspacePassesBashTimeout' -count=1 -vD:\Go\go\bin\go.exe test ./... -count=1with isolatedHOME,USERPROFILE,XDG_CONFIG_HOME,APPDATA, andLOCALAPPDATAD:\Go\go\bin\go.exe vet ./...pnpm --dir desktop/frontend install --frozen-lockfilepnpm --dir desktop/frontend buildD:\Go\go\bin\go.exe test ./... -count=1indesktop/git diff --checkgo test ./internal/tool/builtin -run '^$' -bench 'BenchmarkBashForegroundTimeout' -benchmem -count=5No UI changes, so screenshots are not applicable.