For some reason my companion I was riding with suddenly started attacking me when I was riding a bike to stab zombies with a spear. I was riding at the lowest speed so they could have just jumped off if they felt they need to attack the zombies. But instead they decided to try and kill me.
did you use the wait a turn thing instead of pressing F?
if yes it auto attacks your friendlies and turns them hostile (happend to me too lol)