1d ago
Bug: Daytona bash sandbox never starts (Bun: stream / dynamic require)
Summary
Any bash tool call fails before the command runs. The Daytona sandbox is never provisioned. This is not a bad command — even `echo` dies in the upload layer.
Exact error
Oops, an error occurred!
Uploading file is not supported: Module "stream" is not available in the "bun" runtime: dynamic usage of require is not supported
Repro
1. Open a new chat on scira.ai.
2. Ask the agent to run any shell command (example: `echo bash_ok`, `uname -a`, `pwd`).
3. The bash tool returns the error above immediately.
4. Retrying does not help.
Expected
The Daytona sandbox is created on first bash call, the command runs in /workspace, and stdout comes back. Daytona’s own docs say process/code execution and filesystem upload/download are how this path is supposed to work.
Actual
The host never reaches Linux bash. Failure is in the host runtime (Bun) while uploading files into the sandbox.
Isolation
- Python / code interpreter in the same chat works (Python 3.12.10, Linux).
- Shared /workspace does not exist after the bash failure (`os.path.isdir("/workspace") == False`).
- So this is not “Python sandbox down”; it is specifically the bash provisioning / file-upload path.
Likely cause (from the error string)
Daytona’s TypeScript FileSystem API streams uploads and is documented as Node.js-compatible (Node.js or Bun). The host appears to be Bun. The upload path dynamically `require("stream")`. That call is rejected:
- “Module stream is not available in the bun runtime”
- “dynamic usage of require is not supported”
The second line is the usual ESM-bundled CommonJS stub (esbuild-style: Dynamic require of "x" is not supported). So this looks like bundled host code + Bun, not a user command issue.
Impact
Anything that needs a real shell is blocked: pip/apt, curl/jq pipelines, file prep for /workspace, skill scripts, multi-step builds. Python-only work still runs, but the two tools no longer share /workspace because bash never boots.
Ask
Please either:
1. Run the Daytona upload path on Node.js, or
2. Statically import `node:stream` and stop dynamic `require("stream")` in the Bun bundle, or
3. Skip streaming upload for simple command execution so bash can start without a file upload.
Happy to retest as soon as a fix is out. I can paste a fresh error if the message changes.
Pending