feat(agent): allow per-call subagent timeouts - #584
Open
changer-changer wants to merge 1 commit into
Open
changer-changer wants to merge 1 commit into
changer-changer wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
agenttool currently gives every child the same configured timeout. This adds optionaltimeout_msso the parent can give a quick lookup a shorter deadline or allow a longer investigation without changing the saved defaults. Omission keeps the existing configured timeout / one-hour fallback.The change is confined to the agent tool: both normal and ask-mode schemas expose positive integer milliseconds, and the value is passed to the existing fork timeout. Invalid values (including timer overflow) are rejected before starting work. Parent cancellation still applies. Standalone single-shot hosts explicitly reject the option instead of silently ignoring it. See usage and boundaries.
Validation:
networkFetchtests, reproduced independently on the baseline.timeout_ms: 1000; the actual child request was aborted after about one second despite a 60-second configured default, and the timeout was returned to the parent. An initial standalone live run reached a provider parameter error before the deadline; it is not counted as a passing timeout test. The combined branch contains the existing provider-metadata compatibility change from feat(agent): configure subagent roles and model bindings #576.This PR is based directly on
mainand changes one source file plus tests/docs. It is separate from #579 (the user's default timeout setting) and introduces no new timer, settings screen, or task lifecycle machinery. Related pending subagent changes share this tool path; the combined branch contains the resolved integration for review. No general task-quality or performance improvement is claimed from these controlled checks.