From 89933c5f80c08a21d0b6eb483d1001dc10e2d556 Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Wed, 11 Feb 2026 09:29:14 -0800 Subject: [PATCH] fix: use correct provider home dirs and make SSE failures non-fatal - E2B: /home/user, Daytona: /home/daytona, Vercel: /home/vercel-sandbox, ComputeSDK: /home - Docker-based examples keep /root (correct) - Add missing install-agent steps to Daytona example and doc - Make SSE loop failure non-fatal in acp-http-client transport --- docs/deploy/daytona.mdx | 3 +++ examples/computesdk/src/computesdk.ts | 2 +- examples/daytona/src/daytona-with-snapshot.ts | 2 +- examples/daytona/src/index.ts | 6 +++++- examples/e2b/src/index.ts | 2 +- examples/vercel/src/index.ts | 2 +- sdks/acp-http-client/src/index.ts | 3 ++- 7 files changed, 14 insertions(+), 6 deletions(-) diff --git a/docs/deploy/daytona.mdx b/docs/deploy/daytona.mdx index bf81c8f..e6d8dc8 100644 --- a/docs/deploy/daytona.mdx +++ b/docs/deploy/daytona.mdx @@ -31,6 +31,9 @@ await sandbox.process.executeCommand( "curl -fsSL https://releases.rivet.dev/sandbox-agent/0.2.x/install.sh | sh" ); +await sandbox.process.executeCommand("sandbox-agent install-agent claude"); +await sandbox.process.executeCommand("sandbox-agent install-agent codex"); + await sandbox.process.executeCommand( "nohup sandbox-agent server --no-token --host 0.0.0.0 --port 3000 >/tmp/sandbox-agent.log 2>&1 &" ); diff --git a/examples/computesdk/src/computesdk.ts b/examples/computesdk/src/computesdk.ts index 484817d..bc2ddc6 100644 --- a/examples/computesdk/src/computesdk.ts +++ b/examples/computesdk/src/computesdk.ts @@ -142,7 +142,7 @@ export async function runComputeSdkExample(): Promise { process.once("SIGTERM", handleExit); const client = await SandboxAgent.connect({ baseUrl }); - const session = await client.createSession({ agent: detectAgent(), sessionInit: { cwd: "/root", mcpServers: [] } }); + const session = await client.createSession({ agent: detectAgent(), sessionInit: { cwd: "/home", mcpServers: [] } }); const sessionId = session.id; console.log(` UI: ${buildInspectorUrl({ baseUrl, sessionId })}`); diff --git a/examples/daytona/src/daytona-with-snapshot.ts b/examples/daytona/src/daytona-with-snapshot.ts index b19fad3..0ec694d 100644 --- a/examples/daytona/src/daytona-with-snapshot.ts +++ b/examples/daytona/src/daytona-with-snapshot.ts @@ -29,7 +29,7 @@ console.log("Waiting for server..."); await waitForHealth({ baseUrl }); const client = await SandboxAgent.connect({ baseUrl }); -const session = await client.createSession({ agent: detectAgent(), sessionInit: { cwd: "/root", mcpServers: [] } }); +const session = await client.createSession({ agent: detectAgent(), sessionInit: { cwd: "/home/daytona", mcpServers: [] } }); const sessionId = session.id; console.log(` UI: ${buildInspectorUrl({ baseUrl, sessionId })}`); diff --git a/examples/daytona/src/index.ts b/examples/daytona/src/index.ts index 9a6a1b9..ddbd6fb 100644 --- a/examples/daytona/src/index.ts +++ b/examples/daytona/src/index.ts @@ -20,6 +20,10 @@ await sandbox.process.executeCommand( "curl -fsSL https://releases.rivet.dev/sandbox-agent/0.2.x/install.sh | sh", ); +console.log("Installing agents..."); +await sandbox.process.executeCommand("sandbox-agent install-agent claude"); +await sandbox.process.executeCommand("sandbox-agent install-agent codex"); + await sandbox.process.executeCommand( "nohup sandbox-agent server --no-token --host 0.0.0.0 --port 3000 >/tmp/sandbox-agent.log 2>&1 &", ); @@ -30,7 +34,7 @@ console.log("Waiting for server..."); await waitForHealth({ baseUrl }); const client = await SandboxAgent.connect({ baseUrl }); -const session = await client.createSession({ agent: detectAgent(), sessionInit: { cwd: "/root", mcpServers: [] } }); +const session = await client.createSession({ agent: detectAgent(), sessionInit: { cwd: "/home/daytona", mcpServers: [] } }); const sessionId = session.id; console.log(` UI: ${buildInspectorUrl({ baseUrl, sessionId })}`); diff --git a/examples/e2b/src/index.ts b/examples/e2b/src/index.ts index 98d6034..143d215 100644 --- a/examples/e2b/src/index.ts +++ b/examples/e2b/src/index.ts @@ -31,7 +31,7 @@ console.log("Waiting for server..."); await waitForHealth({ baseUrl }); const client = await SandboxAgent.connect({ baseUrl }); -const session = await client.createSession({ agent: detectAgent(), sessionInit: { cwd: "/root", mcpServers: [] } }); +const session = await client.createSession({ agent: detectAgent(), sessionInit: { cwd: "/home/user", mcpServers: [] } }); const sessionId = session.id; console.log(` UI: ${buildInspectorUrl({ baseUrl, sessionId })}`); diff --git a/examples/vercel/src/index.ts b/examples/vercel/src/index.ts index 818d08c..56fbfe8 100644 --- a/examples/vercel/src/index.ts +++ b/examples/vercel/src/index.ts @@ -42,7 +42,7 @@ console.log("Waiting for server..."); await waitForHealth({ baseUrl }); const client = await SandboxAgent.connect({ baseUrl }); -const session = await client.createSession({ agent: detectAgent(), sessionInit: { cwd: "/root", mcpServers: [] } }); +const session = await client.createSession({ agent: detectAgent(), sessionInit: { cwd: "/home/vercel-sandbox", mcpServers: [] } }); const sessionId = session.id; console.log(` UI: ${buildInspectorUrl({ baseUrl, sessionId })}`); diff --git a/sdks/acp-http-client/src/index.ts b/sdks/acp-http-client/src/index.ts index 5c254a6..976a464 100644 --- a/sdks/acp-http-client/src/index.ts +++ b/sdks/acp-http-client/src/index.ts @@ -450,7 +450,8 @@ class StreamableHttpAcpTransport { return; } - this.failReadable(error); + // SSE failure is non-fatal: the POST request/response flow still works. + // Exiting the loop allows ensureSseLoop() to restart it on the next POST. return; } }