feat(agents): allow per-invocation timeout override on shell/http tools #113

Merged
CoreRasurae merged 1 commits from feature/m1-shell-timeout-override into master 2026-08-05 12:40:43 +00:00

1 Commits

Author SHA1 Message Date
CoreRasurae 0133520555 feat(agents): allow per-invocation timeout override on shell/http tools
CI / lint (pull_request) Successful in 54s
CI / typecheck (pull_request) Successful in 1m28s
CI / security (pull_request) Successful in 1m27s
CI / quality (pull_request) Successful in 53s
CI / build (pull_request) Successful in 1m47s
CI / integration_tests (pull_request) Successful in 4m51s
CI / benchmark (pull_request) Has been cancelled
CI / unit_tests (pull_request) Successful in 6m0s
CI / coverage (pull_request) Successful in 6m9s
CI / status-check (pull_request) Successful in 13s
CI / lint (push) Successful in 55s
CI / typecheck (push) Successful in 1m41s
CI / quality (push) Successful in 1m44s
CI / security (push) Successful in 2m5s
CI / build (push) Successful in 50s
CI / integration_tests (push) Successful in 3m32s
CI / unit_tests (push) Successful in 4m59s
CI / coverage (push) Failing after 16m5s
CI / benchmark (push) Failing after 19m26s
CI / status-check (push) Failing after 4s
The tool agent `timeout` config field (Actor Configuration Standard §4.5,
default 1s) was a static per-agent value, and the shell/http_request timeout
errors told the model to "increase the timeout config value" — an action an
LLM driving the tool cannot take at runtime. The model would instead thread
`timeout N` into the call, corrupting the command.

Both tools now accept an optional per-call `timeout` argument, resolved by a
new immutable `TimeoutPolicy` value object and bounded by a generic
`tools_max_timeout` config field (default 120s). An optional shell-only
`shell_max_timeout` refines the ceiling for `shell` alone and is never
consulted by `http_request`. Absent the argument, behaviour is byte-for-byte
unchanged. Invalid overrides are rejected before any subprocess is spawned or
request is sent; the timeout errors now direct a retry with a larger `timeout`
argument.

Implements ADR-2030 D-9 (accepted revision) and Actor Configuration Standard
§4.5 / §21.1 (Version 1.2.0).

ISSUES CLOSED: #111
2026-08-05 13:12:56 +01:00