Skip to content

feat(sdk): add new onStart hook in sandbox.runCommand({ ... }) - #384

Merged
QuiiBz merged 2 commits into
mainfrom
sdk/add-onstart-hook
Oct 13, 2026
Merged

QuiiBz merged 2 commits into
mainfrom
sdk/add-onstart-hook

Conversation

@QuiiBz

@QuiiBz QuiiBz commented Oct 13, 2026

Copy link
Copy Markdown
Member

This PR adds a new onStart hook inside the sandbox.runCommand() params, that is called right after the command is executed but before it exits

If supplied, that hook is awaited before we continue waiting for the command to exit. This is useful when not using detached: true to be notified as soon as a command started, while keeping a single API call/roundtrip to run a command + get its logs + wait for it to exit

@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
sandbox Ready Ready Preview, v0 Oct 13, 2026 9:12pm UTC
sandbox-cli Ready Ready Preview Oct 13, 2026 9:12pm UTC
sandbox-sdk-ai-example Ready Ready Preview Oct 13, 2026 9:12pm UTC
workflow-code-runner Ready Ready Preview Oct 13, 2026 9:12pm UTC

Request Review

@QuiiBz
QuiiBz merged commit 20bcce6 into main Oct 13, 2026
14 checks passed
@QuiiBz
QuiiBz deleted the sdk/add-onstart-hook branch October 13, 2026 21:29
@github-actions github-actions Bot mentioned this pull request Oct 13, 2026
QuiiBz pushed a commit that referenced this pull request Oct 13, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @vercel/sandbox@3.8.0

### Minor Changes

- Add a new `onStart` hook on `sandbox.runCommand({ ... })` to be
notified when a command is started when not using `detached: true`
([#384](#384))
## sandbox@4.8.1

### Patch Changes

- Updated dependencies
[[`20bcce60794e30341aefe4ab60a308fdae93a557`](20bcce6)]:
  - @vercel/sandbox@3.8.0
## @vercel/sandbox-mock@3.8.0

### Patch Changes

- Updated dependencies
[[`20bcce60794e30341aefe4ab60a308fdae93a557`](20bcce6)]:
  - @vercel/sandbox@3.8.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

This branch was successfully deployed

4 active deployments
Preview – sandbox-sdk-ai-example — fb85f11d Deployed Oct 13, 2026 by vercel[bot]
Preview – sandbox — fb85f11d Deployed Oct 13, 2026 by vercel[bot]
Preview – workflow-code-runner — fb85f11d Deployed Oct 13, 2026 by vercel[bot]
Preview – sandbox-cli — fb85f11d Deployed Oct 13, 2026 by vercel[bot]
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