Tested with Mill version: 0.12.5
I think there may be an issue with mill's stdin/-out forwarding. Running this:
def main(args: Array[String]): Unit =
Iterator.from(0).takeWhile(_ => !Console.out.checkError()).foreach(println)
with mill -i thing.run | head -100 prints the first 100 elements and then keeps the process running.
If I first build a jar with mill thing.assembly and run java -jar out/thing/assembly.dest/out.jar | head -100 it works as expected, printing 100 items and then existing.