Skip to main content
Applies to:
  • Plan:
  • Deployment:

Summary

Issue: TypeScript SDK eval completes successfully and prints results, but the Node.js process hangs indefinitely instead of exiting (CPU shows 99.3% idle). Cause: SDK versions 1.0.0+ have a resource leak in HTTPBackgroundLogger that leaves open handles preventing process exit (regression introduced in commit 369ce701). Resolution: Downgrade to SDK v0.4.9, force process exit after eval completion, or switch to Braintrust AI Proxy endpoints.

Resolution Steps

Step 1: Configure AI Proxy endpoints

Switch from direct Azure OpenAI endpoints to Braintrust AI Proxy (eliminates hang but requires proxy setup).@. Option 2: Downgrade SDK Step 1: Install SDK v0.4.9 Downgrade to the last working version.
npm install braintrust@0.4.9

Step 2: Verify eval exits cleanly

Run your eval and confirm the process terminates after completion.

Option 2: Force Process Exit

Step 1: Add explicit exit after eval

Force Node.js to exit after eval completes.
await Eval("my-eval", {
  data: () => dataset,
  task: async (input) => { /* your task */ },
  scores: [/* your scores */],
});

// Force exit after eval completes
process.exit(0);

Step 2: Run with —no-send-logs flag

Disable telemetry to reduce open handles.
braintrust eval --no-send-logs