He's fine.
If he can open a portal to the Hall of Echoes, I'm sure he could get out of the cave, if he were so inclined. Even if he were vulnerable to poison gas, I'm sure he could deal with it (what with his true name being a spell of creation, and millennia being a blink of an eye to him: Looking for Patriarch Conversation).