Skip to content

MCP gateway startup failure leaves orphaned sandbox running #1498

Description

@AdaAibaby

Body:

When Sandbox.create() is called with an mcp config and the MCP gateway fails to start (non-zero exit code or exception from commands.run), the already-created sandbox is never killed. This leaves orphaned sandboxes consuming resources until they time out.

Affected: Python SDK (async + sync) and JS/TS SDK.

Steps to reproduce:

Call Sandbox.create(mcp={"invalid_server": {}}) with a config that causes mcp-gateway to fail
Observe the exception is raised
The sandbox remains running (visible via Sandbox.list())
Expected: The sandbox should be killed before the error is propagated.

Activity

  1. added a commit that references this issue on Jul 13, 2026
    16390cf
  2. linear-code commented on Jul 23, 2026

    @linear-code
  3. added a commit that references this issue on Aug 7, 2026
    cab27aa
  4. mishushakov commented on Aug 10, 2026

    @mishushakov
    Member

    Hey, this has been fixed in :
    • JS SDK (e2b) v2.38.1
    • Python SDK (e2b) v2.37.1

    Thanks for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions