The mathematical modeling of the interaction of a cellular detonation wave propagating through a hydrogen-air mixture with inert gas plugs is performed. A technology for calculating two-dimensional detonation flows in a reacting gas mixture - non-reacting gas system has been developed. The modes of cellular detonation waves interaction with inert gas plugs were studied. The geometric limits of the clouds of carbon dioxide, argon and nitrogen lead to the cellular detonation failure and isolation of the combustion zone are determined.