Skip to content

Commit c6d0ad9

Browse files
committed
fix(pi): upgrade the E2B SDK so long Pi output streams stop failing
Create PR streams the whole Pi run through one Connect server-stream (`commands.run` -> envd `Process.Start`), held open for the full `PI_TIMEOUT_MS`. Mid-stream it could die with: [internal] protocol error: received unsupported compressed output That string is `@connectrpc/connect-web`, not Pi — Pi has no Connect dependency at all. connect's `compressedFlag` is `0b00000001` and gzip's magic first byte is `0x1f`; `0x1f & 0x01 === 1`, so a raw gzip body fed to the envelope reader trips this on byte one. It reads as "the server sent a compressed envelope" but really means "this was never a Connect envelope" — an HTTP-level gzip that was not transparently decompressed. e2b 2.30.0 pinned `@connectrpc/connect-web@2.0.0-rc.3` and drove envd through undici 7 with `allowH2: true`. e2b 2.36.1 moves to stable connect-web 2.1.2 and loads undici 8.8.0 when Node >= 22.19.0 — exactly our engine floor — so the failing path gets a different HTTP stack. The connect-web upgrade alone is not the fix: 2.0.0-rc.3 and 2.1.2 ship a byte-identical `connect-transport.js` (bar the copyright year), and connect-web still has no `acceptCompression` option by design. The undici 8 swap is the part that matters. `@e2b/code-interpreter@2.7.0` only asks for `e2b: ^2.28.0`, so the override pins the floor we actually need. Verified API-compatible: every method we call (`Sandbox.create`, `runCode`, `commands.run`, `files.read/write`, `kill`, `Template`, `defaultBuildLogger`, `waitForTimeout`) has an identical signature across the two versions, and we never touch `SandboxPaginator`, the one type that changed.
1 parent 579cda1 commit c6d0ad9

3 files changed

Lines changed: 23 additions & 14 deletions

File tree

apps/sim/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"@calcom/embed-react": "1.5.3",
6767
"@cerebras/cerebras_cloud_sdk": "^1.23.0",
6868
"@daytonaio/sdk": "0.197.0",
69-
"@e2b/code-interpreter": "^2.0.0",
69+
"@e2b/code-interpreter": "^2.7.0",
7070
"@earendil-works/pi-ai": "0.80.10",
7171
"@earendil-works/pi-coding-agent": "0.80.10",
7272
"@floating-ui/dom": "1.7.6",

bun.lock

Lines changed: 20 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@
7171
"postgres": "^3.4.5",
7272
"minimatch": "^10.2.5",
7373
"mermaid": "11.15.0",
74-
"zod": "4.3.6"
74+
"zod": "4.3.6",
75+
"e2b": "^2.36.1"
7576
},
7677
"optionalDependencies": {
7778
"@next/swc-darwin-arm64": "16.2.11",

0 commit comments

Comments
 (0)