Skip to content

Add a bridge-capable Sprites sandbox provider #17635

Description

@lgrammel

Background

The provider-agnostic harness abstraction needs additional first-party cloud choices. Sprites provides a native WebSocket-capable proxy through a Sprite’s single http_port, making it suitable for the standard Claude Code and Codex bridge flow. Sprites is the first-priority provider in the proposed rollout.

Feature Request

Add the first-party @ai-sdk/sandbox-sprites package using the provider/session shape and lifecycle conventions established by @ai-sdk/sandbox-vercel, while keeping Sprites-specific behavior out of the core harness and adapters.

Bind the bridge service through the Sprite’s single proxied http_port. Implement getPortUrl so it returns the corresponding directly dialable wss://<name>-<suffix>.sprites.app/ URL and keeps that URL stable across client reconnects and reattachment to the existing sandbox session.

A stock ws client must connect using the returned URL plus ?agent_bridge_token=${encodeURIComponent(token)}. The complete parameter name and encoded value must reach the in-sandbox WebSocket upgrade unchanged. The connection must require no provider-specific client, custom headers, initialization frame, or application-level handshake.

Verify that Claude Code and Codex consume the provider identically through their existing getPortUrl flow, without provider-specific adapter branches. setNetworkPolicy and setPorts remain optional and must not gate bridge capability. If the complete contract cannot be maintained, the provider must not be advertised or selected as bridge-capable and may only support non-bridge flows.

Related Issues

Extracted from #16100

Activity

  1. added theissue type on Jul 21, 2026
  2. kylemclaren commented on Jul 21, 2026

    @kylemclaren

    this is built and ready to go:

  3. lgrammel commented on Jul 22, 2026

    @lgrammel
    CollaboratorAuthor

    Identify issue type

    Identified as Feature
    Confidence: High

    Rationale

    This requests new provider support and bridge capability rather than reporting broken existing behavior.

    Evidence

    • Requests a new first-party @ai-sdk/sandbox-sprites package.
    • Adds Sprites as a bridge-capable cloud sandbox provider with stable WebSocket URL behavior.
    • The comment links an implementation PR that is built and ready.
  4. ahcarpenter commented on Oct 11, 2026

    @ahcarpenter

    An update on this one: @kylemclaren's #16270 had drifted from main and no longer built there, so #21967 carries it forward. It merges main, moves the package to the current sandbox contract, and lets a freshly created Sprite run the bridge harnesses without pre-provisioning. Kyle is kept as author on every one of his commits, and he gave it an LGTM on #16270.

    I ran it live against real Sprites: the 101 upgrade with agent_bridge_token arriving unchanged, the same URL after a reconnect and a reattach, and a Claude Code and a Codex turn each.

    The repo's own workflows haven't run yet because they need a maintainer's approval on a fork PR. Happy to change anything that would make this easier to review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions