Codex progression is quite liniar, its all based on the hp of the mob and the baseline reward MA set for first lvl, which im not sure is cracked yet, a player made a exell sheet where you can put in the numbers and see how much ped you need to cycle for each lvl of codex. and what reward is given. Wahesh and generaly all toulan mobs have fairly high hp compared to their lvl, so wahesh is quite tough to finnish. ive not started lvl 23 and according to my sheet im gonna have to cycle 14000ped to get it, and the reward is supposed to be 43 ped skills from the 2nd skillset. but ingame i see it as 40.62, so either there has been a rebalance, or the sheet is wrong, or the baseline was slightly off.
So short version, codex is based on peds cycled, its predetermined, based on first lvl, and codex reward goes up with the lvls but you get most from skillset 1, less from 2 and least from 3, skillset 4 is only present on the biggest mobs on caly, not on any planet.
P.S. Feel free to ask any of these kinds of questions i take great pleasure in trying to deduct and extrapolate the information