@ai-sdk/tool-bash 1.0.42 Released: Bash Tool and Sandbox Integration Upgraded

AI SDK's bash toolkit 1.0.42 unifies the sandbox entry point and makes createBashTool return synchronously.
@ai-sdk/tool-bash 1.0.42 adjusts the core bash tool-sandbox collaboration path: execution and descriptions now uniformly use the experimental_sandbox sandbox, createBashTool() returns synchronously and creates the working directory at execution time, and HarnessAgent resolves dynamic descriptions using the current context before sending to the runtime.
Title
@ai-sdk/tool-bash 1.0.42 Released: Bash Tool and Sandbox Integration Upgraded
Meta Description
@ai-sdk/tool-bash 1.0.42 released: bash tool execution and description now uniformly use the sandbox provided by experimental_sandbox, createBashTool() now returns synchronously and creates the working directory at execution time, and HarnessAgent dynamic descriptions are now resolved based on the current context.
Article Content
The Bash execution toolkit @ai-sdk/tool-bash in the AI SDK ecosystem has released version 1.0.42. Although labeled as a patch, this update touches the core path of how the tool collaborates with the sandbox: bash tool execution and description now uniformly use the sandbox passed in via experimental_sandbox, and createBashTool() now returns synchronously without requiring a sandbox to be provided upfront. For developers relying on shell capabilities in agent workflows, this is a noteworthy underlying adjustment.

Core Change: Sandbox Becomes the Unified Entry Point for the Bash Tool
The most substantive change in this release is that both the execution and description of the bash tool now use the sandbox provided via experimental_sandbox. Previously, configuration could be scattered between the tool layer and the sandbox layer; now the two converge on a single source, keeping the execution environment consistent with the context that tool descriptions depend on.
This matters especially in agent scenarios. Tool descriptions often determine how the model understands a tool's capability boundaries. If descriptions are disconnected from the actual execution environment, the model is prone to making incorrect calls. Binding descriptions to the current sandbox context as well aligns "what the tool can do" with "where the tool actually executes."
What is a sandbox
In agent and code execution scenarios, a sandbox refers to a controlled, isolated execution environment used to host untrusted or high-risk operations (such as running shell commands and reading/writing files). Its core value is limiting the scope of side effects: processes can only access authorized directories, networks, and resources, so even abnormal command behavior won't affect the host system. experimental_sandbox in the AI SDK is exactly such an abstraction—it exposes a unified execution context to the tool layer, so the bash tool doesn't need to manage process isolation, working directories, and lifecycle itself. Binding both execution and description to the same sandbox instance means the tool capability description the model sees and the environment where commands actually land come from the same configuration, avoiding mismatches like "the description says a path is accessible, but execution actually happens elsewhere."
createBashTool() Now Returns Synchronously
Another notable change is that createBashTool() now returns synchronously and no longer requires a sandbox to be provided at call time. The function creates a custom working directory in the current sandbox at execution time.
This has a direct impact on caller code structure: tool initialization no longer needs to wait for the sandbox to be ready, and tool object creation and sandbox binding are split into two phases. The benefit is a lighter tool registration path—latency-sensitive scenarios can defer sandbox preparation until actual execution. The cost is that developers need to understand that the working directory is created at execution time, not at tool construction time.
Dynamic Descriptions Resolved in HarnessAgent
Supporting changes also include: before sending dynamic tool descriptions to the runtime, HarnessAgent now resolves these descriptions using the current tool context and sandbox. In other words, descriptions are no longer static strings but dynamic results that depend on runtime context. This continues the same idea as "descriptions bound to the sandbox" mentioned earlier, and also explains why description resolution needs to happen before sending to the runtime.
Trade-offs between synchronous return and asynchronous initialization
Changing createBashTool() from async to sync essentially decouples "constructing the tool object" from "preparing the execution environment." A synchronous function returns the tool object immediately upon call, making it suitable for batch-registering tools at module load or agent startup without introducing an await chain for each tool. The cost is that side effects such as sandbox readiness and working directory creation are deferred until first execution, and errors surface later—debugging then requires attention to execution-phase errors rather than initialization-phase ones. For callers, the previous const tool = await createBashTool(...) pattern should be changed to direct assignment; if subsequent logic depends on the sandbox already existing, execution must be explicitly placed after sandbox preparation completes.
Dynamic tool descriptions and runtime context
A tool description is natural-language text passed to the model to explain a tool's purpose and parameters, directly affecting whether and how the model calls that tool. The traditional approach is a static string, but when the environment depends on runtime state (such as directories accessible in the current sandbox or mounted resources), a static description becomes disconnected from reality. Dynamic descriptions defer description generation until just before sending to the runtime, rendering instantly using the current tool context and sandbox instance. HarnessAgent, as the component hosting the agent loop and tool scheduling, completes this resolution step, ensuring the description the model receives reflects real execution conditions. For systems with multiple concurrent sandboxes, this means the same tool may present different descriptions under different sandboxes, and the model's decisions change accordingly.
Practical Impact on Developers
Looking at the changes, this update leans toward internal consistency rather than new capabilities. Projects already using experimental_sandbox need to confirm whether their tool creation path relied on the old async semantics; if the code awaited the return value of createBashTool(), it needs to be adjusted accordingly.
Projects relying on HarnessAgent dynamic descriptions should verify that description resolution still meets expectations when carrying the correct sandbox context, especially in scenarios with multiple sandboxes or multiple working directories. The fact that working directories are created only at execution time also means permissions, paths, and cleanup strategies need to be designed at execution granularity.
Overall, 1.0.42 straightens out the relationship among the bash tool, the sandbox, and descriptions by one layer. For teams building agents that need shell capabilities, this kind of underlying alignment often reduces hard-to-diagnose runtime issues more than surface-level new features.
One-line Summary
The AI SDK's bash toolkit 1.0.42 unifies the sandbox entry point and makes createBashTool return synchronously.
Paragraph Summary
@ai-sdk/tool-bash has released version 1.0.42. Although a patch update, it adjusts the core path of how the bash tool collaborates with the sandbox. There are three main changes: bash tool execution and description now uniformly use the sandbox passed in via experimental_sandbox, aligning the tool capabilities the model sees with the actual execution environment; createBashTool() now returns synchronously and no longer requires a sandbox at call time, with custom working directories deferred to execution time and created in the current sandbox; and HarnessAgent resolves dynamic tool descriptions using the current tool context and sandbox before sending them to the runtime. Overall, this update leans toward internal consistency rather than new capabilities. Users should check for await patterns that depend on the old async semantics and verify description resolution and working directory permission/cleanup strategies in multi-sandbox scenarios.
Related articles

Apple's Entry-Level AirPods On Sale for $99 — a Post-Black Friday Bargain
After Black Friday, the standard AirPods 5 drop to $99 at Amazon, Best Buy, and Target — $30 off. We analyze the value, how it compares to the Pro series, and buying advice.

Banks Leak Social Security Numbers to Reddit and X: Data Collected Even Without Form Submission
U.S. bank online forms reportedly share Social Security numbers and other sensitive data with ad platforms like Reddit and X via third-party tracking scripts—even without submission. This article analyzes the technical mechanism, community consensus, and privacy implications.

NVIDIA NIM Tuning Doubles Open-Source Model Throughput
NVIDIA NIM microservices deliver ~2x open-source model throughput through coordinated tuning of inference backends, batching, and precision settings.