Hydride molecular ions are key ingredients of the interstellar chemistry since they are precursors of more complex molecules. In regions located near a soft X-ray source these ions may resonantly absorb an X-ray photon which triggers a complex chain of reactions. In this work, we simulate ab initio the X-ray absorption spectrum, Auger decay processes and the subsequent fragmentation dynamics of two hydride molecular ions, namely CH2+ and CH3+. We show that these ions feature strong X-ray absorption resonances which relax through Auger decay within 7 fs. The doubly-charged ions thus formed mostly dissociate into smaller ionic carbon fragments: in the case of CH2+, the dominant products are either C+/H+/H or CH+/H+. For CH3+, the system breaks primary into CH2+ and H+, which provides a new route to form CH2+ near a X-ray source. Furthermore, our simulations provide the branching ratios of the final products formed after the X-ray absorption as well as their kinetic and internal energy distributions. Such data can be used in the chemistry models of the interstellar medium.