Skip to content

chore: update e2b js to 2.24 and python to 2.23 - #273

Merged
jakubno merged 2 commits into
mainfrom
chore/update-e2b-deps
May 22, 2026
Merged

chore: update e2b js to 2.24 and python to 2.23#273
jakubno merged 2 commits into
mainfrom
chore/update-e2b-deps

Conversation

@jakubno

@jakubno jakubno commented May 22, 2026

Copy link
Copy Markdown
Member

The transport in e2b core package now has http2=True. This is the key change. With HTTP/2, multiple requests are multiplexed over a single TCP connection. When a request is cancelled (e.g., the client streams disconnect), the server may not detect connection disconnect the same way as HTTP/1.1, because the TCP connection itself isn't closed — only the HTTP/2 stream is cancelled.

@cursor

cursor Bot commented May 22, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Dependency upgrades can change transport defaults (notably HTTP/2) and subtly affect request/stream cancellation behavior; the new forced HTTP/1.1 transport reduces that risk but could still introduce networking regressions.

Overview
Upgrades the e2b SDK in JS (to 2.24.0) and Python (to 2.23.1) and updates lockfiles accordingly, which may break consumers relying on Sandbox.betaCreate/Sandbox.beta_create (now documented for removal in the changeset).

Changes the Python code interpreter to stop using the base SDK’s shared transport for Jupyter requests and instead create a dedicated httpx client transport with http2=False via get_transport(...), to ensure client disconnects/cancellations propagate correctly for the streaming /execute endpoint.

Reviewed by Cursor Bugbot for commit 875fb09. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread js/package.json Outdated

@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: 05e2dd5d1d

ℹ️ 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 js/package.json Outdated
Comment thread python/pyproject.toml Outdated
mishushakov
mishushakov previously approved these changes May 22, 2026
@jakubno

jakubno commented May 22, 2026

Copy link
Copy Markdown
Member Author
The transport now has http2=True. This is the key change. With HTTP/2, multiple requests are multiplexed over a single TCP connection. When a request is cancelled (e.g., the client streams disconnect), the server may not detect connection disconnect the same way as HTTP/1.1, because the TCP connection itself isn't closed — only the HTTP/2 stream is cancelled.

@jakubno
jakubno requested a review from mishushakov May 22, 2026 13:13
@jakubno
jakubno dismissed mishushakov’s stale review May 22, 2026 13:13

I had to change the package a little

@jakubno jakubno changed the title chore: update e2b js to 2.23 and python to 2.22 chore: update e2b js to 2.24 and python to 2.23 May 22, 2026

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5370210. Configure here.

Comment thread python/e2b_code_interpreter/code_interpreter_async.py Outdated
@jakubno
jakubno marked this pull request as draft May 22, 2026 16:46
The base e2b SDK's shared transport now defaults to http2=True. On the
streaming /execute endpoint HTTP/2 multiplexing means a cancelled
request only resets the H2 stream — the underlying TCP connection stays
open and the server can't detect the client disconnect, so long-running
executions can't be cancelled reliably.

Use e2b's get_transport with http2=False for the Jupyter client to keep
a 1:1 mapping between TCP connection and request.
@jakubno
jakubno force-pushed the chore/update-e2b-deps branch from 02b3a4d to 2f903ac Compare May 22, 2026 19:56
@jakubno
jakubno marked this pull request as ready for review May 22, 2026 20:01
Comment thread .changeset/update-e2b-deps.md Outdated
@jakubno
jakubno enabled auto-merge (squash) May 22, 2026 20:01
@jakubno
jakubno disabled auto-merge May 22, 2026 20:03

@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: 2f903acd87

ℹ️ 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 js/package.json
@jakubno
jakubno merged commit a214875 into main May 22, 2026
16 checks passed
@jakubno
jakubno deleted the chore/update-e2b-deps branch May 22, 2026 20:05
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