Internally, Mongoid depends (a lot) on thread-local variables. However, the current implementation actually uses fiber-local variables, rather than truly thread-local variables, which our nifty Fiber-wrapped callback implementation for child documents will loses access to all state that Mongoid has stored for the current thread. This has the potential to cause some really difficult bugs in some niche scenarios (like, when a child document wants to persist something in a cascaded callback).
The solution might be to use true thread-local variables (Thread.current.thread_variable_get/set) instead of fiber-local variables.