Default connect to waiting for health

This commit is contained in:
Nathan Flurry 2026-03-05 19:01:14 -08:00
parent b860767d3f
commit ebf450bd99
9 changed files with 10 additions and 10 deletions

View file

@ -510,6 +510,7 @@ export class SandboxAgent {
token: handle.token,
fetch: options.fetch,
headers: options.headers,
waitForHealth: false,
persist: options.persist,
replayMaxEvents: options.replayMaxEvents,
replayMaxChars: options.replayMaxChars,
@ -1297,11 +1298,11 @@ function normalizePositiveInt(value: number | undefined, fallback: number): numb
function normalizeHealthWaitOptions(
value: boolean | SandboxAgentHealthWaitOptions | undefined,
): NormalizedHealthWaitOptions {
if (!value) {
if (value === false) {
return { enabled: false };
}
if (value === true) {
if (value === true || value === undefined) {
return { enabled: true };
}

View file

@ -204,7 +204,6 @@ describe("Integration: TypeScript SDK flat session API", () => {
const sdk = await SandboxAgent.connect({
token,
fetch: customFetch,
waitForHealth: true,
});
const agents = await sdk.listAgents();