Skip to content

feat(sandbox,vercel-sandbox): stop session defaults to blocking#159

Merged
marc-vercel merged 3 commits into
named-sandboxesfrom
stop-sandbox-default-blocking
Apr 21, 2026
Merged

feat(sandbox,vercel-sandbox): stop session defaults to blocking#159
marc-vercel merged 3 commits into
named-sandboxesfrom
stop-sandbox-default-blocking

Conversation

@marc-vercel
Copy link
Copy Markdown
Collaborator

@marc-vercel marc-vercel commented Apr 21, 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();

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sandbox Ready Ready Preview, Comment, Open in v0 Apr 21, 2026 3:47pm
sandbox-cli Ready Ready Preview, Comment, Open in v0 Apr 21, 2026 3:47pm
sandbox-sdk Ready Ready Preview, Comment, Open in v0 Apr 21, 2026 3:47pm
sandbox-sdk-ai-example Ready Ready Preview, Comment, Open in v0 Apr 21, 2026 3:47pm
workflow-code-runner Ready Ready Preview, Comment, Open in v0 Apr 21, 2026 3:47pm

@marc-vercel marc-vercel merged commit e34a67a into named-sandboxes Apr 21, 2026
14 checks passed
@marc-vercel marc-vercel deleted the stop-sandbox-default-blocking branch April 21, 2026 17:03
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();
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants