You may first see this creature at the end of the tutorial mission. Apparently the physical manifestation of the alien's psionic/data network, it is an electric yellow female-humanoid being, seemingly made entirely of electricity, save for a metallic skull and a bit of spinal column.
You will first fight it after you attempt to Skulljack a ADVENT Captain: you may want to make sure that Captain is otherwise the last enemy on the map. It has high health, a high dodge rate (so even point-blank shots may 'graze' it for partial damage), and high accuracy. For the storyline requirement, the best time to fight it is when there's no turn counter or anything keeping pressure on you.
It's abilities include:
- Teleportation: The Codex will usually teleport instead of physically moving. This has a better-than-average movement range, doesn't trigger overwatch, and the Codex can still fire or use other abilities as its second action. This ability means the Codex will almost always get a flanking shot every round, unless it uses another ability.
- Rift: The Codex can summon a psionic rift. This disables weapons of XCOM soldiers in the area (mechanically, it reduces their ammo to zero). The rift will detonate next turn for medium damage to anything still in the area of effect. This usually costs the turn of any soldier caught by it, since reloading and moving out of the area of effect to avoid the damage is a full turn of actions, though there are options that don't rely on the primary weapon, such as a Ranger's Slash, the Sharpshooter's pistol or using an item.
- Clone: Whenever it takes damage the Codex will clone itself; the remaining HP will be divided between the two clones, rounding down (so if it attempts to clone at 1 HP, it's basically a single teleport). Try to hit it with a high damage attack first if you can, at least so that the clones can be more easily killed themselves.
Flashbangs and other causes of Disorientation greatly reduce it's threat, and seem to restrict it from using it's special abilities. Killing your first Codex reduces Avatar progress by 1, but afterwards, they will spawn in regular enemy pods. In terms of threat level, physical makeup, and plot significance: it is fairly equivalent to the Long War iteration of the Outsider.
After a plot point, you will be tasked with Skulljacking a Codex itself (which, in kind with your first Skulljack of a ADVENT Captain, summons the Avatar). After this task is complete, all future Codices can be Skullmined, offering a low-hassle way to one-hit-kill one without allowing it to clone itself (unless you swing and miss, of course).
Having two soldiers close enough to be Rifted will almost always bait the Codex into doing that, leaving 2-3 soldiers with empty primary guns: at least it causes no damage (as long as you move those soldiers out of the bubble), and gives you a chance to counter-attack. By clone or Teleports, the Codex will tend to at least stay in LoS, thus within range of attack of your squad. A high-ranking Sharpshooter is perhaps best suited to facing them: Standoff shoots all enemies in range (so no matter how many times it clones itself, if they're at low HP, you may be able to take them all down: the Sharpshooter's higher aim helps prevent misses, as well), and Serial can let you snipe-kill several in a row (check your ammo levels, though).