feat(sandbox,vercel-sandbox): stop session defaults to blocking#159
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
AndyW22
approved these changes
Apr 21, 2026
LukeSheard
pushed a commit
that referenced
this pull request
May 7, 2026
Before, we supported the parameter `blocking` when stopping a sandbox.
This is being removed as of now, as we will be making the `stop`
blocking by default. By doing that, we achieve:
1. When stopping a sandbox, we obtain the latest sandbox data and we can
update the `sandbox` instance so that it is not outdated.
2. When stopping a sandbox via CLI, we can show the metrics/billing info
directly.
CLI
---
Before:
```
❯ sandbox stop <name>
✔ Stopping active session from <name>
```
After:
```
❯ sandbox stop <name>
✔ Sandbox stopped.
│ sandbox: jade-rapid-jay-NgZfbj active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
│ session: sbx_DrZYKV2BTInoINSTFul4zJerZL1a active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
╰ snapshot: snap_FpjKuN3QlgQzGTxbYY7dUl8qfAv0 size: 241 MB expires: in 30 days
```
Note that snapshot information only appears IF the sandbox is persistent
and it automatically created a snapshot on shutdown.
SDK
---
Before:
```
const sandbox = Sandbox.create();
// It does not block 100% nor update the `sandbox` instance with the new data.
await sandbox.stop({ blocking: true });
```
After:
```
const sandbox = Sandbox.create();
// Automatically blocks until the sandbox is stopped and, if persistent = true, snapshotted.
await sandbox.stop();
```
LukeSheard
pushed a commit
that referenced
this pull request
May 11, 2026
Before, we supported the parameter `blocking` when stopping a sandbox.
This is being removed as of now, as we will be making the `stop`
blocking by default. By doing that, we achieve:
1. When stopping a sandbox, we obtain the latest sandbox data and we can
update the `sandbox` instance so that it is not outdated.
2. When stopping a sandbox via CLI, we can show the metrics/billing info
directly.
CLI
---
Before:
```
❯ sandbox stop <name>
✔ Stopping active session from <name>
```
After:
```
❯ sandbox stop <name>
✔ Sandbox stopped.
│ sandbox: jade-rapid-jay-NgZfbj active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
│ session: sbx_DrZYKV2BTInoINSTFul4zJerZL1a active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
╰ snapshot: snap_FpjKuN3QlgQzGTxbYY7dUl8qfAv0 size: 241 MB expires: in 30 days
```
Note that snapshot information only appears IF the sandbox is persistent
and it automatically created a snapshot on shutdown.
SDK
---
Before:
```
const sandbox = Sandbox.create();
// It does not block 100% nor update the `sandbox` instance with the new data.
await sandbox.stop({ blocking: true });
```
After:
```
const sandbox = Sandbox.create();
// Automatically blocks until the sandbox is stopped and, if persistent = true, snapshotted.
await sandbox.stop();
```
LukeSheard
pushed a commit
that referenced
this pull request
May 11, 2026
Before, we supported the parameter `blocking` when stopping a sandbox.
This is being removed as of now, as we will be making the `stop`
blocking by default. By doing that, we achieve:
1. When stopping a sandbox, we obtain the latest sandbox data and we can
update the `sandbox` instance so that it is not outdated.
2. When stopping a sandbox via CLI, we can show the metrics/billing info
directly.
CLI
---
Before:
```
❯ sandbox stop <name>
✔ Stopping active session from <name>
```
After:
```
❯ sandbox stop <name>
✔ Sandbox stopped.
│ sandbox: jade-rapid-jay-NgZfbj active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
│ session: sbx_DrZYKV2BTInoINSTFul4zJerZL1a active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
╰ snapshot: snap_FpjKuN3QlgQzGTxbYY7dUl8qfAv0 size: 241 MB expires: in 30 days
```
Note that snapshot information only appears IF the sandbox is persistent
and it automatically created a snapshot on shutdown.
SDK
---
Before:
```
const sandbox = Sandbox.create();
// It does not block 100% nor update the `sandbox` instance with the new data.
await sandbox.stop({ blocking: true });
```
After:
```
const sandbox = Sandbox.create();
// Automatically blocks until the sandbox is stopped and, if persistent = true, snapshotted.
await sandbox.stop();
```
LukeSheard
pushed a commit
that referenced
this pull request
May 11, 2026
Before, we supported the parameter `blocking` when stopping a sandbox.
This is being removed as of now, as we will be making the `stop`
blocking by default. By doing that, we achieve:
1. When stopping a sandbox, we obtain the latest sandbox data and we can
update the `sandbox` instance so that it is not outdated.
2. When stopping a sandbox via CLI, we can show the metrics/billing info
directly.
CLI
---
Before:
```
❯ sandbox stop <name>
✔ Stopping active session from <name>
```
After:
```
❯ sandbox stop <name>
✔ Sandbox stopped.
│ sandbox: jade-rapid-jay-NgZfbj active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
│ session: sbx_DrZYKV2BTInoINSTFul4zJerZL1a active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
╰ snapshot: snap_FpjKuN3QlgQzGTxbYY7dUl8qfAv0 size: 241 MB expires: in 30 days
```
Note that snapshot information only appears IF the sandbox is persistent
and it automatically created a snapshot on shutdown.
SDK
---
Before:
```
const sandbox = Sandbox.create();
// It does not block 100% nor update the `sandbox` instance with the new data.
await sandbox.stop({ blocking: true });
```
After:
```
const sandbox = Sandbox.create();
// Automatically blocks until the sandbox is stopped and, if persistent = true, snapshotted.
await sandbox.stop();
```
LukeSheard
pushed a commit
that referenced
this pull request
May 11, 2026
Before, we supported the parameter `blocking` when stopping a sandbox.
This is being removed as of now, as we will be making the `stop`
blocking by default. By doing that, we achieve:
1. When stopping a sandbox, we obtain the latest sandbox data and we can
update the `sandbox` instance so that it is not outdated.
2. When stopping a sandbox via CLI, we can show the metrics/billing info
directly.
CLI
---
Before:
```
❯ sandbox stop <name>
✔ Stopping active session from <name>
```
After:
```
❯ sandbox stop <name>
✔ Sandbox stopped.
│ sandbox: jade-rapid-jay-NgZfbj active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
│ session: sbx_DrZYKV2BTInoINSTFul4zJerZL1a active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
╰ snapshot: snap_FpjKuN3QlgQzGTxbYY7dUl8qfAv0 size: 241 MB expires: in 30 days
```
Note that snapshot information only appears IF the sandbox is persistent
and it automatically created a snapshot on shutdown.
SDK
---
Before:
```
const sandbox = Sandbox.create();
// It does not block 100% nor update the `sandbox` instance with the new data.
await sandbox.stop({ blocking: true });
```
After:
```
const sandbox = Sandbox.create();
// Automatically blocks until the sandbox is stopped and, if persistent = true, snapshotted.
await sandbox.stop();
```
LukeSheard
pushed a commit
that referenced
this pull request
May 11, 2026
Before, we supported the parameter `blocking` when stopping a sandbox.
This is being removed as of now, as we will be making the `stop`
blocking by default. By doing that, we achieve:
1. When stopping a sandbox, we obtain the latest sandbox data and we can
update the `sandbox` instance so that it is not outdated.
2. When stopping a sandbox via CLI, we can show the metrics/billing info
directly.
CLI
---
Before:
```
❯ sandbox stop <name>
✔ Stopping active session from <name>
```
After:
```
❯ sandbox stop <name>
✔ Sandbox stopped.
│ sandbox: jade-rapid-jay-NgZfbj active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
│ session: sbx_DrZYKV2BTInoINSTFul4zJerZL1a active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
╰ snapshot: snap_FpjKuN3QlgQzGTxbYY7dUl8qfAv0 size: 241 MB expires: in 30 days
```
Note that snapshot information only appears IF the sandbox is persistent
and it automatically created a snapshot on shutdown.
SDK
---
Before:
```
const sandbox = Sandbox.create();
// It does not block 100% nor update the `sandbox` instance with the new data.
await sandbox.stop({ blocking: true });
```
After:
```
const sandbox = Sandbox.create();
// Automatically blocks until the sandbox is stopped and, if persistent = true, snapshotted.
await sandbox.stop();
```
LukeSheard
pushed a commit
that referenced
this pull request
May 11, 2026
Before, we supported the parameter `blocking` when stopping a sandbox.
This is being removed as of now, as we will be making the `stop`
blocking by default. By doing that, we achieve:
1. When stopping a sandbox, we obtain the latest sandbox data and we can
update the `sandbox` instance so that it is not outdated.
2. When stopping a sandbox via CLI, we can show the metrics/billing info
directly.
CLI
---
Before:
```
❯ sandbox stop <name>
✔ Stopping active session from <name>
```
After:
```
❯ sandbox stop <name>
✔ Sandbox stopped.
│ sandbox: jade-rapid-jay-NgZfbj active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
│ session: sbx_DrZYKV2BTInoINSTFul4zJerZL1a active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
╰ snapshot: snap_FpjKuN3QlgQzGTxbYY7dUl8qfAv0 size: 241 MB expires: in 30 days
```
Note that snapshot information only appears IF the sandbox is persistent
and it automatically created a snapshot on shutdown.
SDK
---
Before:
```
const sandbox = Sandbox.create();
// It does not block 100% nor update the `sandbox` instance with the new data.
await sandbox.stop({ blocking: true });
```
After:
```
const sandbox = Sandbox.create();
// Automatically blocks until the sandbox is stopped and, if persistent = true, snapshotted.
await sandbox.stop();
```
LukeSheard
pushed a commit
that referenced
this pull request
May 11, 2026
Before, we supported the parameter `blocking` when stopping a sandbox.
This is being removed as of now, as we will be making the `stop`
blocking by default. By doing that, we achieve:
1. When stopping a sandbox, we obtain the latest sandbox data and we can
update the `sandbox` instance so that it is not outdated.
2. When stopping a sandbox via CLI, we can show the metrics/billing info
directly.
CLI
---
Before:
```
❯ sandbox stop <name>
✔ Stopping active session from <name>
```
After:
```
❯ sandbox stop <name>
✔ Sandbox stopped.
│ sandbox: jade-rapid-jay-NgZfbj active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
│ session: sbx_DrZYKV2BTInoINSTFul4zJerZL1a active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
╰ snapshot: snap_FpjKuN3QlgQzGTxbYY7dUl8qfAv0 size: 241 MB expires: in 30 days
```
Note that snapshot information only appears IF the sandbox is persistent
and it automatically created a snapshot on shutdown.
SDK
---
Before:
```
const sandbox = Sandbox.create();
// It does not block 100% nor update the `sandbox` instance with the new data.
await sandbox.stop({ blocking: true });
```
After:
```
const sandbox = Sandbox.create();
// Automatically blocks until the sandbox is stopped and, if persistent = true, snapshotted.
await sandbox.stop();
```
LukeSheard
pushed a commit
that referenced
this pull request
May 11, 2026
Before, we supported the parameter `blocking` when stopping a sandbox.
This is being removed as of now, as we will be making the `stop`
blocking by default. By doing that, we achieve:
1. When stopping a sandbox, we obtain the latest sandbox data and we can
update the `sandbox` instance so that it is not outdated.
2. When stopping a sandbox via CLI, we can show the metrics/billing info
directly.
CLI
---
Before:
```
❯ sandbox stop <name>
✔ Stopping active session from <name>
```
After:
```
❯ sandbox stop <name>
✔ Sandbox stopped.
│ sandbox: jade-rapid-jay-NgZfbj active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
│ session: sbx_DrZYKV2BTInoINSTFul4zJerZL1a active cpu: 1.582s mem: 4096 MB duration: 14.904s ingress: 1.3 KB egress: 1.8 KB
╰ snapshot: snap_FpjKuN3QlgQzGTxbYY7dUl8qfAv0 size: 241 MB expires: in 30 days
```
Note that snapshot information only appears IF the sandbox is persistent
and it automatically created a snapshot on shutdown.
SDK
---
Before:
```
const sandbox = Sandbox.create();
// It does not block 100% nor update the `sandbox` instance with the new data.
await sandbox.stop({ blocking: true });
```
After:
```
const sandbox = Sandbox.create();
// Automatically blocks until the sandbox is stopped and, if persistent = true, snapshotted.
await sandbox.stop();
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before, we supported the parameter
blockingwhen stopping a sandbox. This is being removed as of now, as we will be making thestopblocking by default. By doing that, we achieve:sandboxinstance so that it is not outdated.CLI
Before:
After:
Note that snapshot information only appears IF the sandbox is persistent and it automatically created a snapshot on shutdown.
SDK
Before:
After: