-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
Summary
mock sessions fail to create (timeout/hang), while claude sessions create successfully on the exact same sandbox-agent server instance.
Environment
sandbox-agentserver:@sandbox-agent/cli@0.2.0sandbox-agentSDK:sandbox-agent@0.2.0- Runtime host: Sprite (
alpha) - Sprite OS:
Linux alpha 6.12.47-fly ... x86_64 - Node:
v22.20.0 - npm:
11.10.0
Minimal repro (inside the same Sprite)
Start server:
sandbox-agent server --no-token --host 127.0.0.1 --port 8080Run probe:
import { SandboxAgent } from "sandbox-agent";
const baseUrl = "http://127.0.0.1:8080";
const withTimeout = (p, ms, label) => Promise.race([
p,
new Promise((_, rej) => setTimeout(() => rej(new Error(`${label} timeout ${ms}ms`)), ms)),
]);
async function run(agent) {
const sdk = await SandboxAgent.connect({ baseUrl });
try {
const session = await withTimeout(
sdk.createSession({ id: `repro_${agent}_${Date.now()}`, agent, sessionInit: { cwd: "/", mcpServers: [] } }),
30000,
`createSession(${agent})`
);
console.log(`[${agent}] createSession ok: ${session.id}`);
} catch (err) {
console.log(`[${agent}] createSession error: ${err?.message || err}`);
} finally {
await sdk.dispose().catch(() => {});
}
}
await run("claude");
await run("mock");Observed output:
[claude] createSession ok: repro_claude_...
[mock] createSession error: createSession(mock) timeout 30000ms
Additional symptom seen from remote URL access
When connecting to the same server through Sprite URL (not loopback), mock also intermittently fails with:
502 stream error: failed writing to agent stdin: Broken pipe (os error 32)- followed by createSession timeout
Expected
mock should create promptly and be usable as a control/test agent independent of provider credentials.
Actual
mock createSession hangs/times out, while other agents on same server can create sessions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels