The chemistry of the diffuse interstellar medium is driven by the combined influences of cosmic rays, ultraviolet (UV) radiation, and turbulence. Previously detected at the outer edges of photodissociation regions (PDRs) and formed from the reaction of C^+^ and OH, CO^+^ is the main chemical precursor of HCO^+^ and CO in a thermal, cosmic-ray, and UV-driven chemistry. Our aim was to test whether the thermal cosmic-ray and UV-driven chemistry is producing CO in diffuse interstellar molecular gas through the intermediate formation of CO^+^ We searched for CO^+^ absorption with the Atacama Large Millimeter Array (ALMA) toward two quasars with known Galactic foreground absorption from diffuse interstellar gas, J1717-3342 and J1744-3116, targeting the two strongest hyperfine components of the J=2-1 transition near 236GHz. We could not detect CO^+^ but obtained sensitive upper limits toward both targets. The derived upper limits on the CO^+^ column densities represent about 4% of the HCO^+^ column densities. The corresponding upper limit on the CO^+^ abundance relative to H_2_ is <1.2x10^-10^. The non-detection of CO^+^ confirms that HCO^+^ is mainly produced in the reaction between oxygen and carbon hydrides, CH2^+^ or CH3^+^, induced by suprathermal processes, while CO^+^ and HOC^+^ result from reactions of C^+^ with OH and H_2_O. The densities r equired to form CO molecules at low extinction are consistent with this scheme.