Async context is available inside the scope that established it. Code invoked outside that scope needs an explicit missing-context policy.
Worked example
import {
AsyncLocalStorage,
AsyncResource,
executionAsyncId,
} from "node:async_hooks";
const context = new AsyncLocalStorage();
console.log(context.getStore() ?? "no context");Result
no contextImplementation notes
Context does not automatically cross process boundaries. Send the relevant correlation data explicitly when delegating work to another process.
Try it yourself
Read the current store before, inside and after the scoped callback.
Open the Node.js example →Editorial date February 24, 2026 · Published December 6, 2026