This is very similar to #105, although that issue looked like it focused on pgen parsing problem.
The pgen release of All of Us data is compliant with the spec with a header of #IID SEX, but Regenie refuses to process it, saying psam : [exome.chr22.psam] ERROR: invalid header (must start with #FID [not #IID]).
The specification says "(FID must either be the first column, or absent. If it's absent, all FID values are now assumed to be '0'.)": https://www.cog-genomics.org/plink/2.0/formats#psam
I observed this on the v4.1.gz release.