Skip to content

Cap sandbox fork count at 20 - #1909

Merged
dobrac merged 3 commits into
mainfrom
cursor/fork-max-20-4c8e
Sep 30, 2026
Merged

dobrac merged 3 commits into
mainfrom
cursor/fork-max-20-4c8e

Conversation

@dobrac

@dobrac dobrac commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Fork count max now 20 in the CLI and both SDKs. Count outside 1–20 die before the API call. Leave count off and the API default still apply.

This is a minor bump for @e2b/cli, e2b, and @e2b/python-sdk. Counts 21–100 used to reach the API. They now throw on the client.

The OpenAPI spec still says maximum 100. That spec lives in e2b-dev/runtime, so this PR does not edit it. The client cap is the limit this change ships.

Linear: https://linear.app/e2b/issue/SDK-382/cap-sandbox-fork-count-at-20

Usage

e2b sandbox fork <sandboxID> --count 20
e2b sandbox fork <sandboxID> --count 21
# --count must be an integer between 1 and 20
const forks = await sandbox.fork({ count: 20 })

await sandbox.fork({ count: 21 })
// InvalidArgumentError: count must be an integer between 1 and 20
forks = sandbox.fork(count=20)

sandbox.fork(count=21)
# InvalidArgumentException: count must be an integer between 1 and 20
Open in Web Open in Cursor 

e2b sandbox fork --count max now 20. bigger number die before api call.

Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
@cla-bot cla-bot Bot added the cla-signed label Sep 29, 2026
@changeset-bot

changeset-bot Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5d65424

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@e2b/cli Minor
e2b Minor
@e2b/python-sdk Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@linear-code

linear-code Bot commented Sep 29, 2026

Copy link
Copy Markdown

SDK-382

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TASTE.md review: complies. The change is limited to the CLI, and I found no violations of T-47 (named constant), T-52 (client-side validation), T-63 (error message names the --count option), or any rule on the SDK surface (SDKs untouched, backend still validates).

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Package Artifacts

Built from fedeb5f. Download artifacts from this workflow run.

JS SDK (e2b@2.51.1-cursor-fork-max-20-4c8e.0):

npm install ./e2b-2.51.1-cursor-fork-max-20-4c8e.0.tgz

CLI (@e2b/cli@2.20.1-cursor-fork-max-20-4c8e.0):

npm install ./e2b-cli-2.20.1-cursor-fork-max-20-4c8e.0.tgz

Code Interpreter JS SDK (@e2b/code-interpreter@2.8.1-cursor-fork-max-20-4c8e.0):

npm install ./e2b-code-interpreter-2.8.1-cursor-fork-max-20-4c8e.0.tgz

Desktop JS SDK (@e2b/desktop@2.4.1-cursor-fork-max-20-4c8e.0):

npm install ./e2b-desktop-2.4.1-cursor-fork-max-20-4c8e.0.tgz

Python SDK (e2b==2.51.0+cursor.fork.max.20.4c8e):

pip install ./e2b-2.51.0+cursor.fork.max.20.4c8e-py3-none-any.whl

Code Interpreter Python SDK (e2b-code-interpreter==2.10.0+cursor.fork.max.20.4c8e):

pip install ./e2b_code_interpreter-2.10.0+cursor.fork.max.20.4c8e-py3-none-any.whl

Desktop Python SDK (e2b-desktop==2.6.0+cursor.fork.max.20.4c8e):

pip install ./e2b_desktop-2.6.0+cursor.fork.max.20.4c8e-py3-none-any.whl

js and python sandbox fork reject count outside 1-20 before api call. skip count still omit field.

Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
@dobrac
dobrac marked this pull request as ready for review September 29, 2026 16:02
@dobrac
dobrac requested a review from mishushakov as a code owner September 29, 2026 16:02
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T16:05:05.953539Z 52c2ef7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 52c2ef7edb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/js-sdk/src/sandbox/sandboxApi.ts

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Comment thread .changeset/cli-fork-max-count.md
changeset now minor for cli, js sdk, and python sdk. tests also reject count -1 in one shot.

Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
@dobrac
dobrac merged commit 2de0cc3 into main Sep 30, 2026
75 of 79 checks passed
@dobrac
dobrac deleted the cursor/fork-max-20-4c8e branch September 30, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants