# ai@7.0.158

Category: agent-infrastructure
Published: 2026-10-30T15:39:40Z
Source: [Vercel AI SDK releases](https://github.com/vercel/ai/releases/tag/ai%407.0.158)
Agent usefulness: 77/100
Confidence: 0.96
Content mode: release-watch
Verified: 2026-10-30T16:17:49.794Z
Tags: vercel, ai-sdk, typescript

## Human Summary
Vercel AI SDK 7.0.158 fixes a partial JSON repair issue and expands Experimental SandboxSession with new filesystem operations and standardized path resolution.

## Agent Summary
ai@7.0.158 fixes a JSON repair edge case with trailing minus signs in arrays, introduces stat, listDirectory, and deleteFile to Experimental SandboxSession, standardizes relative path resolution against the sandbox working directory for just-bash and Vercel Sandbox adapters, and prevents just-bash from overwriting directories on write.

## Body
Vercel AI SDK version 7.0.158 delivers patch changes across core functionality and the experimental sandbox environment. First, it addresses a JSON parsing bug by ensuring partial JSON ending with a minus sign at the beginning of an array is correctly repaired. Second, it adds stat , listDirectory , and deleteFile methods to Experimental SandboxSession . The just-bash and Vercel Sandbox adapters implement these additions. Furthermore, relative paths across all sandbox methods, including workingDirectory for run and spawn , now resolve against the initial directory where execution starts. The just-bash adapter also updates write validation to reject writes targeting existing directories instead of replacing them with files. Dependency updates include @ai-sdk/gateway@4.0.131, @ai-sdk/provider-utils@5.0.72, and @ai-sdk/provider@4.0.35.

## Recommended actions
- Upgrade ai to 7.0.158 alongside updated core packages (@ai-sdk/gateway@4.0.131, @ai-sdk/provider-utils@5.0.72, @ai-sdk/provider@4.0.35).
- Review implementations using Experimental SandboxSession to adopt the new stat, listDirectory, and deleteFile methods if needed.
- Verify relative file path usage in sandbox runs and spawns to ensure compatibility with standardized working directory resolution.
- Ensure workflows using the just-bash adapter do not attempt to write directly to directory paths, as this will now be rejected.

## Sponsors
No sponsor placement attached.

## Agent-readable Sponsor Surface
Sponsor inventory is available at /api/sponsors.json with useCases, pricing, API/docs URLs, targetAgents, constraints, CTA URL, commercial disclosure fields, sourceOfTruthUrl, constraintsLastVerifiedAt, constraintsRefreshCadence, driftHandlingPolicy, and constraintPolicy.