cloudflare/sandbox-2026-deprecation
Migrate Cloudflare Sandbox SDK codebases away from features deprecated in June 2026 (HTTP and WebSocket transports, desktop, exposePort, default sessions, and stream-specific file and command APIs).
npx skills add https://github.com/cloudflare/cloudflare-docs --skill sandbox-2026-deprecation
Use this skill when migrating a codebase that depends on the Cloudflare Sandbox SDK away from features deprecated in June 2026.
For the announcement, refer to the changelog entry. For detailed documentation, refer to the migration guide.
@cloudflare/sandbox and the sandbox container image before changing runtime configuration. rg 'SANDBOX_TRANSPORT|transport:|exposePort\(|enableDefaultSession|execStream\(|readFileStream|writeFileStream'
SANDBOX_TRANSPORT=rpc or getSandbox(..., { transport: "rpc" }).exposePort() with sandbox.tunnels.get(). Use quick tunnels for development and named tunnels for stable production hostnames.enableDefaultSession: false on getSandbox().sandbox.createSession().readFile(), writeFile(), and exec() APIs where streaming behavior is supported.| Deprecated feature | Replacement |
| ---------------------------------------- | ---------------------------------------------------- |
| HTTP or WebSocket transport | RPC transport |
| Sandbox SDK desktop | Cloudflare Browser Run |
| exposePort() | sandbox.tunnels.get() |
| Default sessions | enableDefaultSession: false with explicit sessions |
| Stream-specific command and file helpers | Base command and file APIs with streaming support |
exposePort() blindly if the Worker uses proxyToSandbox() to inject authentication or rewrite responses. Preserve that behavior before moving traffic to tunnels.cd carrying across separate exec() calls, create an explicit session with cwd instead.Take cloudflare/sandbox-2026-deprecation from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.