Set bash tool timeouts in Grok Build
Set bash tool timeouts in Grok Build
Foreground bash commands from the agent have configurable timeouts and output caps. Official keys: Settings reference under [toolset.bash].
Defaults
| Setting | Default | Meaning |
|---|---|---|
timeout_secs |
120 |
Foreground bash command timeout (seconds) |
max_timeout_secs |
36000 |
Cap on model-requested foreground timeouts |
output_byte_limit |
20000 |
Max captured bash output (bytes) |
auto_background_on_timeout |
true |
Auto-background the command when it hits the timeout |
Pin values in user config
[toolset.bash]
timeout_secs = 180
max_timeout_secs = 36000
output_byte_limit = 40000
auto_background_on_timeout = true
Put this in ~/.grok/config.toml / $GROK_HOME/config.toml. Project .grok/config.toml does not own [toolset.*].
Long-running work
When a command should keep going past the foreground timeout:
- Leave
auto_background_on_timeout = trueso the client demotes it when the foreground timer fires. - Or ask the agent to start it in the background, press
Ctrl+Bon a running foreground command, or manage it from/tasks/Ctrl+G— Run background tasks and loops.
Raise timeout_secs for slow installs or builds you still want to finish in the foreground. Raise output_byte_limit when truncated logs hide the failure line.
Pitfalls
max_timeout_secscaps what the model can request; settingtimeout_secsabove that cap still respects the max.- Backgrounded commands are not sandbox escapes — filesystem and network limits still come from Enable the Grok Build sandbox.
- Truncated output at
output_byte_limitcan look like a silent failure; bump the limit or read the on-disk log the agent wrote.