Half step sequences are fairly common in music. They can imply a lot of things such as tritone subs, or non-functional chords. Non-functional means the chords don't follow the rules of traditional diatonic theory. In other words the chords do not relate to the established key center(s). Non-functional does not mean a chord does not sound great.
Also once a nice sounding chord sequence is established, it can be used in many compositions. So it's good if you can learn to recognize the sequence.
The first step in figuring out what to do is to actually figure out the chords. If you write out the chords, the ability to improvise may follow.
If the harmonic analysis produces chords that are not functional/non-diatonic, then you look to the melody and any chord extensions to see what key center may be implied. The idea is you may have four chords in a sequence where three can be analyzed as function, and the fourth is a passing chord that does not relate to the other three. The sequence may pass through multiple key centers, but not really establish any of them.
You can often relate nonfunctional chords to a key center. The key center may not be clear and doesn't necessarily have a clear relationship to the key center implied by adjacent chords. The nonfunctional chord may be something like a ii or IV of another nonfunctional chord. I may make sense to consider this from a modal perspective. If you think of it as a ii/X chord for example, the mode could be (ii-7 Dorian for major), (ii-7b5 Locrian for natural minor and harmonic minor), or (ii-7 Dorian b5 for jazz/melodic minor).
You also have various types of synthetic scales that are not diatonic. So you may have a chord and melody that suggests a scale that cannot be analyzed as diatonic.
Another thing that can make the analysis difficult is chord substitutions. The written chord may be an inversion of the functional chord, or it can be the upper extensions of a functional chord. For example, G-6 is the same chord tones as E-7b5. G-6 = (G,Bb,D,E) and E-7b5 =(E,G,Bb,D). If you don't know, chords are built in 3rds and the extensions keep going above the 7th. 1,3,5,7,9,11,15 9=2, 11=4, 13=6. The quality of the extensions gives hints of the key. For example, G7b9 implies V7 of C minor.
If a chord has lot's of altered extensions it's fairly common to for piano and guitars to only sound the upper chord structure, and the composer may write the upper chord structure on the music.
Not 100% certain about this one, but I believe it's also possible that the most logical functional chord could be extensions of the written chord.
You may also want to know 10=3 and 12=5, but generally if the 3rd or 5th are altered it will be written as a 3rd or 5th, rather than a 10th or 12th.