A coupled nonisothermal gas flow and geomechanical numerical modeling is conducted to study the influence of fractures (joints) on the complex thermohydromechanical (THM) performance of underground compressed air energy storage (CAES) in hard rock caverns. The air-filled chamber is modeled as porous media with high porosity, high permeability, and high thermal conductivity. The present analysis focuses on the CAES in hard rock caverns at relatively shallow depth, that is, ≤100 m, and the pressure in carven is significantly higher than ambient pore pressure. The influence of one discrete crack and multiple crackson energy loss analysis of cavern in hard rock media are carried out. Two conditions are considered during each storage and release cycle, namely, gas injection and production mass being equal and additional gas injection supplemented after each cycle. The influence of the crack location, the crack length, and the crack open width on the energy loss is studied.