Change8
Error2 reports

Fix NotForkableError

in LangChain

Solution

The "NotForkableError" in LangChain usually arises when trying to fork a process (often with agents or chains) that contains non-forkable resources like CUDA tensors or shared memory objects, especially on platforms like Windows or macOS. To fix this, ensure your code doesn't rely on forking for parallelism when handling CUDA tensors or shared memory. Consider using multithreading (instead of multiprocessing with forking) or restructuring your code to avoid sharing such resources across processes.

Timeline

First reported:May 15, 2026
Last reported:May 15, 2026

Need More Help?

View the full changelog and migration guides for LangChain

View LangChain Changelog