Skip to main content
POST
parent
string
required
The parent sandbox id.
winner
string
required
A child sandbox id (typically a fork of parent) whose state should replace parent’s.

What actually happens

Atomically swap: parent’s microVM is destroyed and the winner’s microVM takes over parent’s id. After the call:
  • parent.id is still a valid sandbox id, but it now drives the winner’s underlying VM.
  • winner.id is no longer a live sandbox. The SDK flags the winner object so its close() becomes a no-op (prevents double-destroy).
  • Siblings are NOT touched. If you forked n=5 and one is the winner, the other 4 are still alive — the caller destroys them explicitly.

Idempotency

  • Merging the same winner twice: second call returns 404 (winner id gone after first merge).
  • Merging a sandbox into itself: 400.

Typical pattern