Skip to content

fix(code-interpreter): forward context authentication tokens - #1955

Closed
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1791368952-interpreter-auth
Closed

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1791368952-interpreter-auth

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Forward X-Access-Token for context creation, listing, restart, and removal in JS and both Python clients, preserving traffic-token routing and tokenless clients. This lets the same sandbox credential authenticate execution and context management when the interpreter template enables authentication. Ship these SDK releases before the token-only e2b-dev/code-interpreter#342; envd provisioning is https://github.com/e2b-dev/belt/pull/4368. Jupyter isolation in e2b-dev/code-interpreter#343 is independent and needs no SDK update.

Usage remains unchanged: const context = await sandbox.createCodeContext(); await sandbox.restartCodeContext(context) (Python: context = sandbox.create_code_context(); sandbox.restart_code_context(context)).

Related: https://linear.app/e2b/issue/SDK-363/verify-code-interpreter-context-endpoint-auth-requirements

Verification: 17 focused JS and 18 Python tests passed; format, lint and typecheck passed. The new auth tests fail with HTTP 401 on the pre-fix clients and pass with token forwarding restored.

Link to Devin session: https://app.devin.ai/sessions/23861bced08343e59c14adf841498b12
Open in Devin Desktop: https://app.devin.ai/desktop/session/23861bced08343e59c14adf841498b12?variant=devin
Requested by: @mishushakov

Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

TASTE.md review: no violations found. The change forwards X-Access-Token in all four context operations in JS, sync Python, and async Python alike (T-1/T-2 parity), and keeps the token on the internal envdAccessToken / _envd_access_token field (T-18). No public API, options, errors, or docstrings change.

Written by Devin

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Package Artifacts

Built from 824637a. Download artifacts from this workflow run.

JS SDK (e2b@2.53.2-devin-1791368952-interpreter-auth.0):

npm install ./e2b-2.53.2-devin-1791368952-interpreter-auth.0.tgz

CLI (@e2b/cli@2.21.2-devin-1791368952-interpreter-auth.0):

npm install ./e2b-cli-2.21.2-devin-1791368952-interpreter-auth.0.tgz

Code Interpreter JS SDK (@e2b/code-interpreter@2.8.3-devin-1791368952-interpreter-auth.0):

npm install ./e2b-code-interpreter-2.8.3-devin-1791368952-interpreter-auth.0.tgz

Desktop JS SDK (@e2b/desktop@2.4.1-devin-1791368952-interpreter-auth.0):

npm install ./e2b-desktop-2.4.1-devin-1791368952-interpreter-auth.0.tgz

Python SDK (e2b==2.53.1+devin.1791368952.interpreter.auth):

pip install ./e2b-2.53.1+devin.1791368952.interpreter.auth-py3-none-any.whl

Code Interpreter Python SDK (e2b-code-interpreter==2.10.3+devin.1791368952.interpreter.auth):

pip install ./e2b_code_interpreter-2.10.3+devin.1791368952.interpreter.auth-py3-none-any.whl

Desktop Python SDK (e2b-desktop==2.6.1+devin.1791368952.interpreter.auth):

pip install ./e2b_desktop-2.6.1+devin.1791368952.interpreter.auth-py3-none-any.whl

@devin-ai-integration

devin-ai-integration Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor Author

The Cloudflare CI leg failed with Network connection lost. during sandbox creation and execution, while both new context-auth tests passed. I reran the full Cloudflare suite locally against live sandboxes: 88/88 passed at the merge-base (c0f426ae4), and 90/90 passed at this PR's head (ef9414d60). I could not reproduce the failing CI requests locally; this does not establish a pre-existing failure. No retries, skipped tests, or CI-specific SDK behavior were added.

See the Cloudflare job (112754571531) in https://github.com/e2b-dev/E2B/pull/1955/checks.

@linear-code

linear-code Bot commented Oct 9, 2026

Copy link
Copy Markdown

SDK-363

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.

1 participant