Skip to content

feat: per-tool timeout overrides via AGY_TIMEOUT_<TOOL> env vars#1

Merged
sshahzaiib merged 1 commit into
mainfrom
per-tool-timeouts
Jun 16, 2026
Merged

feat: per-tool timeout overrides via AGY_TIMEOUT_<TOOL> env vars#1
sshahzaiib merged 1 commit into
mainfrom
per-tool-timeouts

Conversation

@sshahzaiib

Copy link
Copy Markdown
Owner

Summary

Each tool can now have its timeout configured independently via an AGY_TIMEOUT_<TOOL_NAME> env var — without touching the others or republishing the package.

Previously the only knob was the global AGY_TIMEOUT, which overrides every tool's timeout at once (e.g. raising deep_search to 300s would also drop delegate from 600s to 300s).

Precedence: per-tool env (AGY_TIMEOUT_DEEP_SEARCH) > global AGY_TIMEOUT > per-tool default.

Changes

  • config: parse AGY_TIMEOUT_<TOOL> env vars into a perToolTimeouts map (keyed by lowercased tool name; ignores non-positive/non-integer values)
  • server: resolve a per-tool override ahead of the global override and the tool default
  • README: document the pattern, the precedence, and the full list of variables
  • tests: env parsing, ignore-invalid values, per-tool-only application, and per-tool-wins-over-global precedence

Variables

AGY_TIMEOUT_ANALYZE_FILES, AGY_TIMEOUT_DEEP_SEARCH, AGY_TIMEOUT_WEB_LOOKUP, AGY_TIMEOUT_ADVERSARIAL_REVIEW, AGY_TIMEOUT_FOLLOW_UP, AGY_TIMEOUT_DELEGATE

Verification

  • npm run typecheck
  • npm test — 70 passed, 1 skipped (+4 new tests) ✅
  • npm run build

Each tool can now have its timeout set independently with
AGY_TIMEOUT_<TOOL_NAME> (e.g. AGY_TIMEOUT_DEEP_SEARCH=300) without
affecting the others. Precedence: per-tool env > global AGY_TIMEOUT
> per-tool default.

- config: parse AGY_TIMEOUT_<TOOL> env vars into perToolTimeouts
- server: resolve per-tool override ahead of global/default
- README: document the pattern and full variable list
- tests: parsing, ignore-invalid, per-tool-only, override-precedence
@sshahzaiib sshahzaiib merged commit 3bb98c8 into main Jun 16, 2026
1 check passed
@sshahzaiib sshahzaiib deleted the per-tool-timeouts branch June 16, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant