Resolution is one of the key indicators in the cavity optomechanical mass sensing. The bound states in the continuum (BIC), enables extremely narrow linewidths, which has great potential for enhancing the resolution of cavity optomechanical mass sensors. In this paper, we propose a simple double-cavity optomechanical system under blue detuning conditions to realize the BIC singularity and present an ultrahigh-resolution mass sensing scheme based on BIC . By solving the linearized HeisenbergLangevin equations, the expressions for the susceptibility and transmission rate of the system are derived. The absorption spectrum of the system exhibits three peaks, where the middle narrow peak is a gain peak. When the optomechanical cooperativity coefficient equals the double-cavity cooperativity coefficient plus one, the imaginary part of the eigenvalue for the middle narrow peak becomes zero, enabling the realization of BIC. The linewidth of the middle peak is ultrasmall under this BIC condition, and the shift of the transmission peak in the transmission spectrum is linearly related to the adsorbed mass. Based on these characteristics, the system under the BIC condition can enable mass sensing with an ultrahigh resolution and resolution can reach on the order of 1 ag. Additionally Furthermore, the real and imaginary parts of the eigenvalue for the middle peak are exhibit negligible variation under the influence of mechanical resonator frequency shifts. This indicates that the mass sensing scheme based on BIC in the double-cavity optomechanical system can maintain ultrahigh resolution and precise quality measurement under mechanical resonator frequency shifts. Our scheme provides an approach to realize the BIC singularity in optomechanical systems and offers a new route to improving the resolution of mass sensors based on cavity optomechanical systems.