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

`sandbox.cwd` should always return a valid path #354

Closed mlejva closed 3 months ago

mlejva commented 7 months ago

Currently sandbox.cwd can return string or none/undefined but that don't make sense because even if a developer doesn't set cwd manually, all operations are happening in the / path.

So by default sandbox.cwd should return /.

ValentaTomas commented 3 months ago

The new beta SDK does not have the .cwd on the sandbox because of subtle bugs (like this) and because we wanted it as stateless as possible.