Cook Doctor reads the first four bytes of every file your cook log accuses

Truncate a single .uasset in an Unreal 5.8 project and cook it. On a measured run here that produced 1,779 “Package is unloadable” errors. One of them named the file that was actually broken. 1,775 of them accused engine installation files whose bytes are perfect.

That is the problem worth naming. The natural reading of that log is that your engine install is corrupt, so the next move is to verify or reinstall it, and that is an afternoon spent on the wrong thing.

The reason is in PackageReader.cpp at line 159. “Reason: Invalid value for PACKAGE_FILE_TAG at start of file” is printed from a branch that fires either on a bad tag or on the reader already being in an error state. One message, two causes. So most of those lines are a claim about four bytes that the engine never actually checked.

The cascade is not a fixed size. Four runs of the same break produced 1,339, 1,412, 1,538 and 1,779 accusations, and the last two were the same file broken the same way. The shape held every time: one true cause, a false cascade in the thousands, most of it pointed at files that are fine. The same cook also finished 418 packages where the clean control run finished 578, without saying so anywhere.

Cook Doctor opens every accused file, reads its first four bytes, and compares them against PACKAGE_FILE_TAG. Anything whose tag is intact gets cleared. What survives is the real list, which in the run above was one file.

It ships with source. 19.99 USD on itch: Cook Doctor for Unreal Engine 5.8 by CSAF — Core Systems Asset Factory

Disclosure: this plugin was written by AI, as is everything from Core Systems Asset Factory, and the store listing carries that tag. The figures above came from real cook runs with a clean control run taken first.