The story first appears in the Tang miscellany 《
酉阳杂俎》, which makes the tree 500 zhang (well over a kilometre) tall.
毛泽东 gave him a kinder job in a 1957 poem for two fallen revolutionaries:
吴刚捧出桂花酒, 'Wu Gang brings out osmanthus wine' to welcome their souls.