-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat: add configurable task timeouts for sub-recipes #3690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
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
…over text and chat input height returning to auto (block#3469)
rust failures are not related
…when there is an invalid route (block#3610)
- Add get_task_timeout method to Task struct to extract timeout from payload - Update workers and executor to use task-specific timeouts - Modify sub_recipe_tools to include task_timeout in task payload when present - Support both sub_recipe and text_instruction task types 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Add unit tests for get_task_timeout method in types module - Test timeout extraction for both sub_recipe and text_instruction tasks - Add tests for sub_recipe_tools task creation with timeouts - Test invalid timeout values and edge cases - Add executor tests for custom timeout handling 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
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.
(closed this because diff was nasty -- going to re-open against 1.1.4)
#3691
Description
This PR adds support for configurable task timeouts in sub-recipes, allowing users to specify custom execution timeouts for individual sub-recipes that may require more time than the default timeout allows.
Motivation
Currently, all sub-recipe tasks use a global default timeout (typically 300 seconds). However, some sub-recipes may legitimately need more time to complete, such as:
Without the ability to configure timeouts per sub-recipe, users have to either:
Implementation Details
1. Task Timeout Extraction
get_task_timeout()method to theTaskstruct that extracts thetask_timeoutvalue from the task payloadsub_recipeandtext_instructiontask typesOption<u64>to handle cases where no timeout is specified2. Sub-Recipe Task Creation
create_sub_recipe_task()to extracttask_timeoutfrom sub-recipe values if present3. Task Execution
4. Backward Compatibility
task_timeoutspecified will continue to use the default timeoutUsage Example
Users can now specify a timeout in their sub-recipe configuration:
Testing
Comprehensive test coverage has been added:
All tests pass successfully.
Changes Made
get_task_timeout()method to extract timeout from task payloadNote
This PR is based on the v1.1.4 release (commit cc34ce2) to ensure compatibility with the stable version. The implementation accounts for the directory structure differences between versions (using
sub_recipe_execution_toolinstead ofsubagent_execution_tool).