fix(integrations): propagate framework timeout to bashkit execution limits#1207
Merged
fix(integrations): propagate framework timeout to bashkit execution limits#1207
Conversation
…imits Add timeout_seconds parameter to Python BashTool/Bash constructors and propagate it through all framework wrappers (LangChain, PydanticAI, DeepAgents). Add timeoutMs to JS BashOptions and propagate through Anthropic/OpenAI adapters. Add AbortSignal support to JS adapter handlers so framework cancellation stops bashkit execution. Closes #1185
The mypy CI check failed because the _bashkit.pyi stub file was missing the timeout_seconds parameter on BashTool.__init__ and Bash.__init__, while the integration modules (pydantic_ai, langchain, deepagents) were already passing it.
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.
Summary
timeout_secondsparameter to Python bindings (Bash, BashTool) and all framework wrappers (LangChain, PydanticAI, DeepAgents)timeoutMsoption to JS wrapper and framework adapters (Anthropic, OpenAI)Closes #1185
Test plan
test_bash_tool_timeout_aborts— verifies timeout terminates long-running scriptstest_bash_tool_timeout_allows_fast— verifies fast scripts complete within timeouttest_bash_timeout_aborts— same for Bash classtest_langchain_accepts_timeout,test_pydantic_ai_accepts_timeout,test_deep_agents_accepts_timeouttimeoutMstests