Skip to content

fix(integrations): propagate framework timeout to bashkit execution limits#1207

Merged
chaliy merged 2 commits intomainfrom
fix/1185-framework-timeout-propagation
Apr 11, 2026
Merged

fix(integrations): propagate framework timeout to bashkit execution limits#1207
chaliy merged 2 commits intomainfrom
fix/1185-framework-timeout-propagation

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 11, 2026

Summary

  • Add timeout_seconds parameter to Python bindings (Bash, BashTool) and all framework wrappers (LangChain, PydanticAI, DeepAgents)
  • Add timeoutMs option to JS wrapper and framework adapters (Anthropic, OpenAI)
  • Add AbortSignal support to Anthropic and OpenAI JS adapter handlers for framework cancellation propagation
  • Add comprehensive tests for timeout propagation and AbortSignal handling

Closes #1185

Test plan

  • Python: test_bash_tool_timeout_aborts — verifies timeout terminates long-running scripts
  • Python: test_bash_tool_timeout_allows_fast — verifies fast scripts complete within timeout
  • Python: test_bash_timeout_aborts — same for Bash class
  • Python: test_langchain_accepts_timeout, test_pydantic_ai_accepts_timeout, test_deep_agents_accepts_timeout
  • JS: Anthropic/OpenAI timeoutMs tests
  • JS: Anthropic/OpenAI pre-aborted AbortSignal tests

chaliy added 2 commits April 11, 2026 03:54
…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.
@chaliy chaliy merged commit 90cea4c into main Apr 11, 2026
25 of 27 checks passed
@chaliy chaliy deleted the fix/1185-framework-timeout-propagation branch April 11, 2026 04:20
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.

sec(python/js): AI framework wrappers don't propagate execution limits from framework config

1 participant