That happens when you compile with the default Hammer compile tools. It doesn't set the sky brushes as solid brushes, so you can travel through them.
To fix that, you'd make brushes outside the sky brushes and give them the clip texture. But the ZHLT compile tools sets the sky brushes as solid brushes as an option, and they work much better and are more detailed than the Hammer compile tools anyway.
Download them <a href="http://collective.valve-erc.com/index.php?go=mhlt">here</a>, and set Hammer up so it uses them instead of the default tools.