Changelog

CodeSandbox SDK sessions API, list running sandboxes & many improvements
Time for another big update to CodeSandbox SDK, including a new API and some top feature requests.
Hey hey 👋
We're back with another CodeSandbox update!
Now that we're back on a regular changelog schedule, let's look at the top features & improvements we shipped in the last 2 weeks.
What's new?
We introduced a new API to CodeSandbox SDK, which allows you to create multiple users in a single sandbox, allowing for collaborative editing and sharing sandboxes publicly. This has been a top feature request and it unlocks some cool use cases like allowing multiple users to connect to the same sandbox/branch and collaboratively edit files. It also enables creating anonymous previews. More details in our Docs.

We have the first working prototype of Sandpack running CodeSandbox SDK! This will allow you to run server-side sandboxes directly in Sandpack, which in turn will allow for easier integration of CodeSandbox SDK for use cases that require an in-browser playground/editor. More updates soon!
With this experimental feature, we mount a FUSE filesystem for node_modules
. This FS lazily serves contents from a global pnpm store (shared by all VMs) based on pnpm-lock.yaml
. This reduces npm installation time (from scratch, basic Next.js project) from 8s to 25ms and the node_modules
folder is deduplicated across all VMs, saving a lot of disk space. This will make creating new VMs from scratch much faster, in case you don't have a snapshot yet available. The functionality is currently behind a feature flag; in the next update, we'll open it up to play with.
You can now list running sandboxes programmatically or via the CLI, making it easier to monitor and manage active environments. Filter by status or tag, retrieve sandbox details in bulk, and even automate mass hibernation or shutdown. These updates improve sandbox management at scale, with more runtime insights coming soon.

CodeSandbox SDK Improvements & Bug Fixes
Added sandbox.keepActiveWhileConnected(enabled: boolean) to keep a sandbox from hibernating while the SDK is connected (for more granular hibernation control).
.csbignore, .gitignore, and .dockerignore files will not be part of Snapshot Builder's output anymore.
Removed the unexpected behavior that kept a sandbox alive for 2x hibernation timeout if a client was connected.
More improvements to memory snapshot loading, which now allows CodeSandbox SDK to resume & clone VMs ~100-200ms faster.
Fixed a bug in CodeSandbox SDK where child processes of a process would not always get terminated when terminating a shell.
Increased the limit for sandbox tags to 64 characters to support users wanting to use UUIDs as tags.
General Improvements & Bug Fixes
Fixed an issue in our style loader that resulted in an error when using CSS @import statements from node_modules dependencies.
Fixed an issue with the subscription management buttons not displaying correctly in the workspace settings for some annual Pro workspaces.
And that's all we have for you today.
We're thrilled to see so many people building exciting projects on top of CodeSandbox SDK!
We have lots of exciting features ahead, so stay tuned.
See you soon 👋