on the HTC One M8, sometimes the sender's name won't be displayed in the messages list even if you have already save that specific number. And you just see the sender's number.
While we expect HTC to fix this issue in the next update, here is a temporary solution to show the sender's name in messages list:
1. Open Messages application
2. Find a text message that fits the problem and tap the contact's picture
3. Now press the Back button to return to the Messages again
4. Press the Recent Apps button (right to the Home Button) and remove the Messages application from the recent apps list by sliding it up
5. Go back to the Messages application and you can see the issue has been fixed
Unfortunately this fix is temporarily and you may need to repeat it each time you face the problem. Note that, sometimes the trick works as you just remove the Messages application from the Recent Apps menu