For readers to feel they know a character, some details need to be consistent. If a man is allergic to peanuts in Chapter One, he had better be allergic to peanuts in Chapter Four. But that doesn’t mean he can’t deliberately eat a peanut butter sandwich in Chapter Five.
Ralph Waldo Emerson is often cited observing that “consistency is the hobgoblin of little minds,” as if any continuity of thought reduces a speaker’s intelligence, but the context and even the full quote are usually lost. The line from his 1841 essay, “Self-Reliance,” follows the idea that “the other terror that scares us from self-trust is our consistency” – that is, the anger of other people at our nonconformity plus the desire to remain consistent with our own previous opinions prevent new independent thought.
Emerson’s full sentence is, “A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines.” The line descries a foolish consistency, held for the sake of other people’s opinions, and implies a contrast to a sensible consistency, held for better reasons.
The same applies to writing characters. Some things needs to be held consistent, including the rules of the world you have created. A rancher who’s never picked up a gun shouldn’t shoot like a gunfighter unless the genre is so loosely related to reality that anything can happen. In a magical world things can change magically, but the rules of magical change must be observed.
We recognize human beings by our contradictions as well. A big man with a deep voice is hardly memorable, but a big man with a squeaky voice is Mike Tyson. Two instances of frugality – say, one comment and one action – will convince a reader that a character is cheap. But the same character can act with extraordinary generosity if something overcomes her frugality, and a reader will guess at the cause of that change.
So what about our peanut-allergic character in Chapter Five? The details of the context make the difference. Perhaps he doesn’t know he’s eating peanut butter and is being poisoned. Perhaps he is forced to eat peanut butter or starve. Perhaps he deliberately chooses to put himself into anaphylactic shock, to escape a prison cell. In all three cases, if a writer consistently establishes the allergy, each becomes a moment of dramatic tension.