How do I fix my sprint/walk glitch?

Sometime when I'm playing Minecraft I'll try to sprint and it does this glitch where my character goes sprint-walk-sprint-walk. It's really annoying, especially in parkour. Is there a way to fix this, or is this even a glitch? Any help much appreciated.


Solution 1:

This is the longstanding bug MC-4098.

If you want this to be fixed, please vote for it. Also, you can leave a comment for every version you encounter this in (if it isn't already in the list), that way it's better known in which versions it exists, which could help to fix it. It's a bug that is hard to reproduce, so if you know a way to do it, please also leave a comment about that.