Tune code execution timeouts

Raise bundled defaults and fallback timeout tuples for normal and output runtimes so builds, installs, servers, tests, and training jobs have room to stream or poll without premature timeout. Document the long-running work behavior while keeping normal command execution bounded and directing extended work toward output polling.

Alessandro committed Jun 2, 2026 at 09:15 UTC e05a285dcf0fc17ac025e10af2ed1cbfe54efe8b
4 files changed +11 -9
plugins/_a0_connector/helpers/exec_config.py
+2 -2
@@ -29,8 +29,8 @@ def build_exec_config(*, agent: object | None = None) -> dict[str, Any]:
29 cfg = plugins.get_plugin_config("_code_execution", agent=agent) or {}
30 return {
31 "version": 1,
32 - "code_exec_timeouts": _parse_timeouts(cfg, "code_exec", (30, 15, 180, 5)),
33 - "output_timeouts": _parse_timeouts(cfg, "output", (90, 45, 300, 5)),
32 + "code_exec_timeouts": _parse_timeouts(cfg, "code_exec", (30, 15, 240, 5)),
33 + "output_timeouts": _parse_timeouts(cfg, "output", (120, 60, 600, 5)),
34 "prompt_patterns": _parse_patterns(cfg.get("prompt_patterns", "")),
35 "dialog_patterns": _parse_patterns(cfg.get("dialog_patterns", "")),
36 }
plugins/_code_execution/README.md
+2
@@ -23,6 +23,8 @@ This plugin provides the code execution tool used by agents for development task
23 - Can open SSH interactive sessions instead of local shells when configured.
24 - **Streaming output**
25 - Continuously reads shell output, updates the current log item, and detects progress while commands are running.
26 +- **Long-running work**
27 + - Keeps normal command execution responsive while giving the `output` runtime longer polling windows for builds, installs, servers, tests, and training jobs.
28 - **Safety around running sessions**
29 - Tracks whether a shell is currently busy and can prevent overlapping commands unless explicitly allowed.
30
plugins/_code_execution/default_config.yaml
+4 -4
@@ -13,13 +13,13 @@ ssh_pass: ""
13 # Timeouts for python/nodejs/terminal runtimes (seconds)
14 code_exec_first_output_timeout: 30
15 code_exec_between_output_timeout: 15
16 -code_exec_max_exec_timeout: 180
16 +code_exec_max_exec_timeout: 240
17 code_exec_dialog_timeout: 5
18
19 # Timeouts for "output" runtime (seconds)
20 -output_first_output_timeout: 90
21 -output_between_output_timeout: 45
22 -output_max_exec_timeout: 300
20 +output_first_output_timeout: 120
21 +output_between_output_timeout: 60
22 +output_max_exec_timeout: 600
23 output_dialog_timeout: 5
24
25 # Shell prompt detection patterns (one regex per line)
plugins/_code_execution/tools/code_execution_tool.py
+3 -3
@@ -228,7 +228,7 @@ class CodeExecution(Tool):
228 first_output_timeout=30,
229 between_output_timeout=15,
230 dialog_timeout=5,
231 - max_exec_timeout=180,
231 + max_exec_timeout=240,
232 sleep_time=0.5,
233 prefix="",
234 timeouts: dict | None = None,
@@ -546,8 +546,8 @@ def _get_config(agent) -> dict:
546 "ssh_port": int(cfg.get("ssh_port", 55022)),
547 "ssh_user": str(cfg.get("ssh_user", "root")),
548 "ssh_pass": str(cfg.get("ssh_pass", "")),
549 - "code_exec_timeouts": _parse_timeouts(cfg, "code_exec", (30, 15, 180, 5)),
550 - "output_timeouts": _parse_timeouts(cfg, "output", (90, 45, 300, 5)),
549 + "code_exec_timeouts": _parse_timeouts(cfg, "code_exec", (30, 15, 240, 5)),
550 + "output_timeouts": _parse_timeouts(cfg, "output", (120, 60, 600, 5)),
551 "prompt_patterns": _parse_patterns(cfg.get("prompt_patterns", "")),
552 "dialog_patterns": _parse_patterns(cfg.get("dialog_patterns", ""), re.IGNORECASE),
553 }