diff --git a/.changeset/on-resume-control-plane-caveat.md b/.changeset/on-resume-control-plane-caveat.md new file mode 100644 index 0000000000..19c4b68e1d --- /dev/null +++ b/.changeset/on-resume-control-plane-caveat.md @@ -0,0 +1,6 @@ +--- +"e2b": patch +"@e2b/python-sdk": patch +--- + +Document that `onResume` / `on_resume` needs a control plane that knows the option: an older self-hosted or BYOC control plane drops the `memory` field and restores memory while reporting success, instead of rejecting the request. diff --git a/packages/js-sdk/src/sandbox/sandboxApi.ts b/packages/js-sdk/src/sandbox/sandboxApi.ts index 0b6f215a5a..2e5307f150 100644 --- a/packages/js-sdk/src/sandbox/sandboxApi.ts +++ b/packages/js-sdk/src/sandbox/sandboxApi.ts @@ -710,6 +710,12 @@ export type SandboxConnectOpts = ConnectionOpts & { * is not enabled; a no-op for a snapshot without memory or a sandbox that is * already running. * + * Needs a control plane that knows this option: E2B Cloud, or a self-hosted + * or BYOC deployment built from `e2b-dev/infra` at or after the commit that + * added the `memory` field to connect/resume (2026-08-20). An older control + * plane drops the field and restores memory while answering as if the + * request had succeeded. + * * @default 'restore' * @throws {@link InvalidArgumentError} if the value is outside the two literals. */ diff --git a/packages/python-sdk/e2b/sandbox_async/main.py b/packages/python-sdk/e2b/sandbox_async/main.py index e3912b2700..35ed4c1e97 100644 --- a/packages/python-sdk/e2b/sandbox_async/main.py +++ b/packages/python-sdk/e2b/sandbox_async/main.py @@ -284,6 +284,10 @@ async def connect( Rejected where filesystem-only resume is not enabled; a no-op for a snapshot without memory or a sandbox that is already running. A value outside the two literals raises `InvalidArgumentException`. + Needs a control plane that knows this option: E2B Cloud, or a self-hosted or BYOC + deployment built from `e2b-dev/infra` at or after the commit that added the `memory` + field to connect/resume (2026-08-20). An older control plane drops the field and + restores memory while answering as if the request had succeeded. :return: A running sandbox instance @example @@ -322,6 +326,10 @@ async def connect( Rejected where filesystem-only resume is not enabled; a no-op for a snapshot without memory or a sandbox that is already running. A value outside the two literals raises `InvalidArgumentException`. + Needs a control plane that knows this option: E2B Cloud, or a self-hosted or BYOC + deployment built from `e2b-dev/infra` at or after the commit that added the `memory` + field to connect/resume (2026-08-20). An older control plane drops the field and + restores memory while answering as if the request had succeeded. :return: A running sandbox instance @example @@ -356,6 +364,10 @@ async def connect( Rejected where filesystem-only resume is not enabled; a no-op for a snapshot without memory or a sandbox that is already running. A value outside the two literals raises `InvalidArgumentException`. + Needs a control plane that knows this option: E2B Cloud, or a self-hosted or BYOC + deployment built from `e2b-dev/infra` at or after the commit that added the `memory` + field to connect/resume (2026-08-20). An older control plane drops the field and + restores memory while answering as if the request had succeeded. :return: A running sandbox instance @example diff --git a/packages/python-sdk/e2b/sandbox_sync/main.py b/packages/python-sdk/e2b/sandbox_sync/main.py index 976d7c357b..d252c54f31 100644 --- a/packages/python-sdk/e2b/sandbox_sync/main.py +++ b/packages/python-sdk/e2b/sandbox_sync/main.py @@ -278,6 +278,10 @@ def connect( Rejected where filesystem-only resume is not enabled; a no-op for a snapshot without memory or a sandbox that is already running. A value outside the two literals raises `InvalidArgumentException`. + Needs a control plane that knows this option: E2B Cloud, or a self-hosted or BYOC + deployment built from `e2b-dev/infra` at or after the commit that added the `memory` + field to connect/resume (2026-08-20). An older control plane drops the field and + restores memory while answering as if the request had succeeded. :return: A running sandbox instance @example @@ -317,6 +321,10 @@ def connect( Rejected where filesystem-only resume is not enabled; a no-op for a snapshot without memory or a sandbox that is already running. A value outside the two literals raises `InvalidArgumentException`. + Needs a control plane that knows this option: E2B Cloud, or a self-hosted or BYOC + deployment built from `e2b-dev/infra` at or after the commit that added the `memory` + field to connect/resume (2026-08-20). An older control plane drops the field and + restores memory while answering as if the request had succeeded. :return: A running sandbox instance @example @@ -351,6 +359,10 @@ def connect( Rejected where filesystem-only resume is not enabled; a no-op for a snapshot without memory or a sandbox that is already running. A value outside the two literals raises `InvalidArgumentException`. + Needs a control plane that knows this option: E2B Cloud, or a self-hosted or BYOC + deployment built from `e2b-dev/infra` at or after the commit that added the `memory` + field to connect/resume (2026-08-20). An older control plane drops the field and + restores memory while answering as if the request had succeeded. :return: A running sandbox instance @example