Milo was 8 weeks old when he did that..I think he came home from the breeders house knowing how to climb,because he climbed out of his pen many times before we understood how he was doing it.
We had his pen pushed up against the couch,so heīd climb up the part that was against it and jump down safely to the soft couch,then there was only a little way down to the floor,so thankfully he never hurt himself.I put him in his pen and hid one day,and thatīs how we caught him.You can cover the pen with mesh or even adapt a sheet (I made one with elastic edges to fit right around the top).Once he sees a "roof",heīll stop trying to climb out