Watch the C Jazzed online guitar lesson by Larry Carlton from 335 Blues
A colorful rhythm part like the one we just laid down helps feed me solo ideas, so I keep an ear out for those altered chords and rhythm changes when I improvise.
When I heard that raised 9 chord on the first chorus, I felt the blues - so I responded with some bluesy lines. Because the next chorus contained more altered chords, it reminded me of the comping you hear in a lot of bebop music - so I responded accordingly.
If the rhythm part is establishing its own sound - say, a major or minor approach - the soloist can play freely but has to listen carefully. As always!
When I'm not sure which direction the guy comping is going to go in, I like to play parts that don't commit to major or minor one way or another. If you can avoid the chord tones like the 3rd degree - since a major 3rd says "major" and lowered 3rd says "minor" - you can keep soloing until a chord change suggests a clearer context to work within.