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. Luckily, its plasma weapon is not very high powered, so even a flanking crit will not be lethal once you have Predator Armor.
- 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. Auto-loaders can also allow your soldier to reload for free, negating the weapon disable. If it's really worth it, you can also choose to keep a soldier in the AoE and eat the damage, since it will not be lethal to a full HP soldier, though be aware that the rift detonation could destroy their cover.
- Clone: Whenever it takes damage the Codex will clone itself; the remaining HP will be divided between the two clones, rounding up for the clone and down for the original (so if it attempts to clone at 1 HP, it will just teleport). Since any amount of damage will result in a clone, try to hit it with high damage attacks, reducing the number of clones you need to face before it's destroyed.
Flashbangs and other causes of Disorientation greatly reduce its threat by restricting it from using its 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).