Valve's Portal 2 source code was leaked online revealing leftover code from the long-canceled Half-Life 2: Episode 3 final chapter.
Valve’s 2011 puzzle platformer Portal 2, which received critical acclaim, is the most recent title from the firm to have its source code leaked online.
The complete source code is believed to have come from a Portal research Discord server via a user with existing privileges to it. However, online chatter suggests that the code had been circulating privately for years by this point.
It has since spread to file-sharing sites and GitHub. This represents Valve’s second significant breach in recent months; in August, the company experienced a data breach that revealed more than 12 terabytes of internal data, including a decade’s worth of Steam files.
The leak has allowed modders to replicate the mythically canceled F-Stop, a prequel to Portal. The biggest discovery in the new leak is leftover code from Half-Life 2: Episode 3, the long-canceled final chapter of the Half-Life 2 saga. While the game and its modding tools had shipped with some remnants, this leak contains the actual code Valve carried over from the canceled project.
The leak includes directories for Alien Swarm, Dota, and the canceled Stars of Blood sitting next to a folder named “ep3,” and a file for “Blob Demo Monster,” an NPC tied to blob enemy experiments found in separate Episode Three code earlier this month.
Discord server shares leaked code
Valve dataminer Gabe Follower first spotted the leak on X, reporting that a Discord group studying early Portal 2 builds had copies passed around for years. The company has only ever given modders the Portal 2 Authoring tools, making this unauthorized release significant.
The full source code for Portal 2 has just leaked, including some leftovers from Half-Life 2: Episode Three and other games from Source engine. pic.twitter.com/rs4CbBvzKB
Leak reveals Half-Life 2: Episode 3 remnants
The leak also contains a file for “Blob Demo Monster,” an NPC with a 1996-2007 Valve copyright header.
The files do not provide enough material for a playable version of the game, but they offer a deeper look into its development remnants.

As has been confirmed many times, Valve abandoned development of Episode 3 sometime in 2008-2009. There is not enough code in the leak for a playable version of the game. The closest fans will get to an Episode 3 experience is Valve’s VR prequel, Half-Life: Alyx.
While Valve may shrug off the leak of a 15-year-old game, the GitHub repository is unlikely to last for long. Valve hasn’t commented on this leak so far, but a takedown for the repository is expected.
Related reading