Codex will generally ruin your day. Codex's job description is to scramble your team all over the place because of its unique abilities. Her Clone ability will make her multiply as many times as she receives damage. You can have as many Codex's Clones as her point bar numbers (this absolutely depends on the difficulty setting of your game). All of her clones will have the same capabilities except for channeling the Psionic Rift.
The Psionic Rift creates a large multidimensional dome on an area. Any unit caught within the rift will have their weapons emptied, forcing them to reload if they want to fire their weapons. Not only that, but after one turn, the rift bursts and damages everyone inside of it, including alien forces and the Codex herself. The Codex are not immune to their own Psionic Rift. Codex only casts the Psionic Rift if there are several units lumped together.
Codex also teleports all over the the place. So you better position your Sharpshooter in an area that allows her