Isolate connection reuse to one runner/workflow and close it on every exit.
Nested callers join the existing scope so a storyboard still gets exactly
one reusable session rather than one session per helper layer.
Every MCP call made inside fn — endpoint probe, capability discovery,
tools/list, and tool calls — reuses one negotiated session per
(endpoint, credential, tenant headers, signing identity, transport policy).
Per-call correlation headers, AbortSignals and timeouts do not choose the
session. The scope terminates its sessions once, when fn settles; pass
{ isolate: true } to force a fresh scope even when called from inside one.
Explicit workflows terminate sessions at exit even if an inner call returned
submitted/working; the caller owns that lifetime. Implicit task scopes may
close only their local clients when their final result remains nonterminal.
Isolate connection reuse to one runner/workflow and close it on every exit. Nested callers join the existing scope so a storyboard still gets exactly one reusable session rather than one session per helper layer.
Every MCP call made inside
fn— endpoint probe, capability discovery,tools/list, and tool calls — reuses one negotiated session per (endpoint, credential, tenant headers, signing identity, transport policy). Per-call correlation headers,AbortSignals and timeouts do not choose the session. The scope terminates its sessions once, whenfnsettles; pass{ isolate: true }to force a fresh scope even when called from inside one. Explicit workflows terminate sessions at exit even if an inner call returned submitted/working; the caller owns that lifetime. Implicit task scopes may close only their local clients when their final result remains nonterminal.