I think a loose system would be best, maybe a series of possible events based on the class of the companion. If [thief] then, after x amounts of offending activity there would be a warning message (not necessarily a conversation with an option to talk them out of it, I think this is overdone and is too kind to players), something noting that this guy has been acting kind of suspicious, in one way or another.
Clues in the message could give you an idea of what's coming (for slight offenses and butt-hurtness you could get something like "Bob's been avoiding the others lately, and things have gone missing"--this could lead to items and gold disappearing. If you've acted so far off from their worldview that killing you seems best, then the message could say something like "You've been noticing that Bob has had a peculiar look in his eye in recent days. He's been sharpening his [weapon of choice] while watching you quite a bit lately."). After a few more rests, giving you a chance to reconsider how you're acting, and changing the outcome through those actions rather than a cheesy conversation, the event trigger could go off. X gold missing, stolen books or something for mild upsets, or maybe an event after you rest one morning where they try to kill you in your sleep (you get damaged by x amount and they flee).
The most important thing to me would be being able to find them after the betrayal. If they stole items or gold, they'd better have it on them, or I'm taking something else. Their ears, maybe. In this case, being able to intimidate them back into the party [With no more lip, gol-darnit] would be hilarious. If they tried to kill me, though, I think the mutual disfavor would have to lead the conversation inevitably to their horrible, disfiguring demise.