In the next diff I am going to change the way target_message is handled. Looking at code and in history when target_message was introduced, it is mainly for getRelatedMessages query (stack ending with D12737).
To be able to test it somehow, I decided to first implement detailed tests to how target_message is utilized - I used Claude code for this and it did suprisingly good job.