orangy
watch config is indeed matched as a substring with a path to binary (jar or .class), so classes in watch key makes it match everything including ktor-core and thus ApplicationEnvironment (ctor param) is also loaded in autoreloaded classloader, and it mismatches one that is loaded by core. To fix it use your module name as watch key, and I will see what can I do to make either better diagnostics or eliminate the issue altogether.