Record environment state in AsyncGenerator before beginning forking generators. Otherwise isDevMode() doesn't work within a forked thread.