It's not the best of pictures! Might even be upside down!
But, the bricks should meet the adjacent wall and it is best practice to bond in or use ties.
Most importantly, the wall must have integrity for fire. OK so the crammed in cavity fire sock may or may not work and it is highly likely that smoke will get through into your home/roofspace.
That said ,the other side of the cavity party wall may have continuous masonry?