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. It’s Valve’s second notable leak in recent months.
The biggest discovery in the new leak is leftover code from Half-Life 2: Episode 3. What’s new is the actual code Valve carried over from the canceled game. That doesn’t mean there’s enough there for something playable. As it’s been confirmed many times, Valve abandoned development of Episode 3 sometime in 2008-2009.

Valve has never given modders access to the full source code before, only the Portal 2 Authoring tools.
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
Online chatter suggests the code had been circulating privately within this group for years before it spread to file-sharing sites and GitHub.
This leak follows another notable incident in August, when a data breach exposed more than 12 terabytes of internal Valve data, including a decade’s worth of Steam files. Valve has not commented on the Portal 2 leak, but a takedown for the GitHub repository is expected.
Valve Corporation has shaped gaming history through major franchises like Half-Life, Counter-Strike, and Dota, alongside pioneering digital distribution via Steam since 2003. By 2011, Steam dominated over half the digital PC games market, generating $3.4 billion in 2017 alone. The company’s flat structure empowers employees to innovate, leading to iconic titles such as Portal (2007) and Left 4 Dead (2008), while its hardware ventures like the Steam Deck (2022) expand its influence beyond software.

A Valve dataminer spotted that the code includes directories for Alien Swarm, Dota, and the canceled Stars of Blood sitting next to a folder named “ep3,” along with a file for a “Blob Demo Monster” NPC carrying a 1996-2007 Valve copyright header. Valve hasn’t commented on this leak so far, but a takedown for the GitHub repository is expected.