e2b-dev / E2B

Secure open source cloud runtime for AI apps & AI agents
https://e2b.dev/docs
Apache License 2.0
7.02k stars 458 forks source link

Requests to sandbox are not cancelled after the sandbox is killed #424

Open ValentaTomas opened 3 months ago

ValentaTomas commented 3 months ago

When you kill a sandbox while there is a request (background process, filesystem operation) in progress, the promise/future will not be canceled until the actual timeout of the request.

Ideally, we would cancel all requests with a special message indicating that the reason for cancelation is sandbox kill. We might need to solve this by modifying the infra because just canceling the requests in SDK does not cover all use cases.