In plants, the substomatal cavity is the cavity located immediately proximal to the stoma. It acts as a diffusion chamber connected with intercellular air spaces and allows rapid diffusion of carbon dioxide and other gases (such as plant pheromones) in and out of plant cells.