Environment
- SDK version:
sandbox-agent@0.4.0
- Platform: macOS (Darwin 25.1.0, arm64)
- Runtime: Bun 1.3.8 and Node.js 25.2.1
- Agent:
mock (installed via sandbox-agent install-agent mock)
Symptoms
Creating a session with agent: "mock" causes the mock agent process to crash immediately after the ACP connection is established. The SDK receives an ECONNRESET / "other side closed" error.
The claude agent works perfectly with the same setup.
Reproduction
import { SandboxAgent } from "sandbox-agent";
import { local } from "sandbox-agent/local";
const sdk = await SandboxAgent.start({ sandbox: local() });
console.log("Started:", sdk.sandboxId);
// This hangs then errors with ECONNRESET
const session = await sdk.createSession({ agent: "mock", cwd: "/" });
Error output:
ACP write error: error: The socket connection was closed unexpectedly.
path: "http://127.0.0.1:<port>/v1/acp/sdk-mock-<uuid>?agent=mock",
code: "ECONNRESET"
Same error occurs with both Bun and Node.js, confirming it's not runtime-specific.
Expected behavior
createSession({ agent: "mock" }) should return a session handle that responds to prompts with mock data, as documented in the quickstart.
What works
SandboxAgent.start() succeeds
sdk.listAgents() shows mock as installed with all capabilities
sdk.getHealth() returns { status: "ok" }
createSession({ agent: "claude" }) works perfectly
session.prompt(...) works with claude agent
Impact
The mock agent is intended for SDK/integration testing without provider credentials. Without it, tests must use the claude agent with real API keys.
Environment
sandbox-agent@0.4.0mock(installed viasandbox-agent install-agent mock)Symptoms
Creating a session with
agent: "mock"causes the mock agent process to crash immediately after the ACP connection is established. The SDK receives anECONNRESET/ "other side closed" error.The
claudeagent works perfectly with the same setup.Reproduction
Error output:
Same error occurs with both Bun and Node.js, confirming it's not runtime-specific.
Expected behavior
createSession({ agent: "mock" })should return a session handle that responds to prompts with mock data, as documented in the quickstart.What works
SandboxAgent.start()succeedssdk.listAgents()shows mock as installed with all capabilitiessdk.getHealth()returns{ status: "ok" }createSession({ agent: "claude" })works perfectlysession.prompt(...)works with claude agentImpact
The mock agent is intended for SDK/integration testing without provider credentials. Without it, tests must use the
claudeagent with real API keys.