I think you’re okay here – the code requirement about solid or fully-grouted blocks applies to the masonry supporting the flue liner. What you’re looking at in the photo is a decorative brick wrap around the structural portion of the chimney. My main concern would be to ensure that this area is properly capped and sealed so that critters and rainwater can’t get into the cavity and find their way further into your home.
That’s true if the right side is a flue, but with neither fire brick nor flue liner in evidence, I suspect it’s purely decorative – I’m interpreting OP’s text description to mean that we’re looking at one of two lined flues, and one of two unexpected void spaces he found when removing the cap. I don’t think the void is actually connected to anything, and instead is just decorative, but if I’m wrong and you’re correct, then yeah – there are more serious issues to deal with here