WARNING: The following contains spoilers for Devs, now streaming on FX on Hulu.

Alex Garland's Devs has thrown its protagonist Lily (Sonoya Mizuno) into the deep end recently as she got committed to a mental institution after investigating the death of her boyfriend, Sergei (Karl Glusman). The programmer was killed after trying to steal Amaya's code for the tech company's quantum coding and temporal project, and Lily's been trying to expose the cover-up as she's an encryption engineer there too.

However, she and her ex Jaime (Jin Ha) were discovered by Amaya stealing valuable footage, and as the company's security chief Kenton (Zach Grenier) assaulted the young man, Lily was committed, showing just how powerful her boss and Amaya's owner, Forest (Nick Offerman) really is. But in the fifth episode, she may have a surprise ally on her hands as there may be a traitor in the Devs project: Katie (Allison Pill).

RELATED: Devs Just Pulled Off Its Own Ocean's Eleven Tech Heist

Katie's as cold and as mean as it gets, with this episode showing her rebelling in her university days during quantum physics classes. She lashed out in class because she thought the topics were too elementary for her, and while she viewed her classmates' intelligence levels as rudimentary, at the core of it all she was financially struggling and pegged to drop out. It's in this flashback we see Forest recruiting her to help him build code to bring his dead daughter back from the timestream, and seeing as he became a father-figure, we can understand just how unbreakable their bond may be.

It's why in the present Katie functions as his right-hand man, making executive decisions leading the team. She's the only one allowed to break the rules and peer forward in time, along with Forest, and no matter what, she stands up to him. So much so, she even used "bad coding techniques" as Lyndon did before he got fired, all to show Forest maybe they can harvest an Amaya -- ironically, the name of his dead daughter -- from the Multiverse, and not this world's one as he so doggedly wants from the past. She seems to be the only person who can get him to compromise, which makes it a shock she'd be willing to go rogue.

RELATED: Devs: Amaya's Historical Cameos Are Sexy, Scandalous & Scary

However, it was hinted at in the last episode when she spotted Lily dying but didn't say anything. Granted, it was just one probability. Now, it seems like she's trying to ensure this outcome doesn't happen, disenchanted by Forest's ego and the way he treated Lyndon, Katie's best coder. It could also be why she's breaking the rules more and future-hopping, possibly trying to undermine Forest and find a solution that he won't see coming. She's not advising Forest as much and when Kenton actually comes to them, warning if they see him as expendable or someone to rat out for killing Sergei, he'll turn on them. Katie takes note of the civil war as Forest tries to alleviate the drama, and it seems she has her own plan to put the fire out.

It's unlikely she can directly overthrow Forest as it's his company and she might not have the power, but at the end of the episode, she does foresee Jaime breaking Lily out her facility. She smirks rather than alert Kenton or Forest, and it could be she's playing the long game. If Forest and Kenton fall, Forest will most likely take the blame for Katie, so Katie could be plotting a secret corporate coup. That sly takeover could see her partnering with Lily and Co. not directly, but from the shadows, using her knowledge future to help them, thus leaving no traceable evidence. How long could she keep this ruse up will be interesting but luckily, seeing as she built Devs from the ground up with Forest, it's unlikely he'll ever suspect her of duplicity or backstabbing.

Kenton's antics may be the catalyst for betrayal so she can save herself, but with the U.S. and Russian governments monitoring their work to potentially steal too, Katie knows she has to act fast. She seems to be in it for the sprint, and not the marathon as Forest initially thought, and the fact he blindly trusts her could work to Katie's advantage. Helping Lily get justice could absolve Katie, incriminate her colleagues and set the path for Katie to continue the unique temporal voyeurism with the government, and as Forest once said, there are few people alive as proactive and visionary as Katie. Once she stays off the radar, he'd be willing to leave the project under her purvey, none the wiser at what may be transpiring.

Devs, entirely written, directed and edited by Alex Garland, is streaming on FX on Hulu. It stars Nick Offerman, Alison Pill, Sonoya Mizuno, Jin Ha, Zach Grenier, Stephen McKinley Henderson, Karl Glusman and Cailee Spaeny. New episodes will be released every Thursday.

KEEP READING: Devs Reveals What (or WHO) Amaya Is - and What Forest Is Trying to Do