Hmm it seems it does not calculate amount of coal to mithril ore.
If it does not divideable by 27.
With 27 coal in inventory and 18 in bank, and 63 mithril ores, it stopped with out of coal message
Edit:
Also it just randomly stops when banking:
00:02:37 INFO Bank start
00:02:37 INFO...