#798

Add configurable per-tool timeout setting

Openfuleinistopened 7mo ago

Problem

When running background agents, some tools (like git clone on large repos or running full test suites) can take longer than the default timeout allows. There is no way to override timeouts on a per-tool basis, causing valid operations to fail unnecessarily.

Proposed Solution

Add a configurable toolTimeouts map in the agent configuration that allows users to specify custom timeout values per tool name. For example:

toolTimeouts:
  bash: 300000      # 5 min for shell commands
  git.clone: 600000  # 10 min for large repo clones
  web_fetch: 30000   # 30s for web fetches

This would override the default timeout for specific tools without changing the overall agent timeout.

Use Case

A developer running a full test suite via the agent needs 8 minutes for their e2e tests. With configurable per-tool timeouts, they can set bash: 600000 for that session and complete the workflow without timeout failures.

Alternatives Considered

  • Global timeout increase: too blunt, slows down error detection for quick operations
  • Per-run timeout flag: requires changes every run, not a persistent preference

Activity

1
DevRajah6mo ago

Hi, I’d like to work on this.

I’ll look into adding a toolTimeouts configuration map so individual tools can override the default timeout while preserving the existing fallback behavior.

I’ll keep the PR focused on this issue and include tests/docs if the config surface already has a suitable place for them.