Skip to main content
The effect-orpc/node entrypoint installs a Node AsyncLocalStorage bridge for Effect FiberRefs.
side-effect-import.ts
import "effect-orpc/node";

withFiberContext

import.ts
import { withFiberContext } from "effect-orpc/node";
withFiberContext(fn) captures the current Effect fiber refs and runs an async callback inside the Node bridge.
with-fiber-context.ts
await Effect.runPromise(
  Effect.gen(function* () {
    yield* Effect.annotateLogsScoped({ requestId: "req_123" });
    yield* withFiberContext(() => next());
  }),
);

When to import

NeedImport
Passive bridge across split effect-orpc runtime boundariesimport "effect-orpc/node"
Capture outer Effect request context before calling framework continuationimport { withFiberContext } from "effect-orpc/node"

See also

Last modified on June 15, 2026