MAYBE your boss has asked you to give harsher feedback than you think is warranted. Maybe you’ve given in to pressure to work weekends — again — when it’s your only time with your kid. Or maybe you’ve agreed to install monitoring software to track employees, something most IT professionals say makes them feel uneasy.

These moments aren’t only unpleasant. What makes them especially stressful is the mirror they hold up: I am someone who yells at subordinates. I am someone who puts work ahead of my own child. I am someone who spies on employees.

In their new book, The Microstress Effect: How Little Things Pile Up and Create Big Problems — and What to Do About It, Rob Cross and Karen Dillon explain that when jobs include tasks that challenge employees’ personal values, it creates stress in part by undermining their sense of identity. That can gradually wear people down. (Disclosure: Dillon was the editor of Harvard Business Review when I started working there in the late aughts.)

Microstresses have always existed, but a couple of aspects of modern work make them perhaps more common now — technology that allows irate clients and demanding bosses to reach employees day and night; jobs that demand not only time and effort, but deep emotional commitments; a lack of boundaries between the personal and professional. Today, many people look to their careers to provide the sense of community and identity they once got from religious organizations and social clubs.

Today’s polarized political environment can contribute to identity-challenging microstresses, too, by making so many conflicts feel all-or-nothing. Employees might never have relished working for a client whose political beliefs they found offensive, or upholding a maternity leave policy they thought was insultingly stingy. But today, doing so not only feels distressing. It feels complicit.

Megan Reitz, a professor at the Hult International Business School in the UK who studies employee activism, pinpoints the conundrum: Upholding the status quo is, itself, a kind of political statement. “There is no such thing as being apolitical. Inaction is as political as action.”

The problem, of course, is that it isn’t feasible to change jobs every time a task conflicts with personal values. And most jobs involve some level of moral compromise. “There is no perfect company,” Dillon admits.

Especially when someone is very invested in their job, it’s easier to go along with demands that make them uncomfortable. After all, these are hardly major moral transgressions — no one here is being asked to commit a crime. And yet the strain can build up over time. As one of the managers Cross and Dillon interviewed said, “I’ve become one of those people I never used to like. I don’t even know how this happened.”

That’s why, in the authors’ interviews with 300 people identified by their organizations as high achievers, the happiest were those who had “granular clarity” on their priorities, which made it easier to identify the lines they didn’t want to cross.

One subject in the study walked away from a job worth $500,000 in salary and bonuses because it involved a relocation that would conflict with the kind of life he wanted to live — one rooted in family, friends and community. He told Cross and Dillon he has no regrets about taking a less lucrative job.

Others found ways to make their jobs feel more meaningful by taking more initiative. For instance, one of Dillon and Cross’ interviewees was discouraged when her boss flatly told her their only job was to increase shareholder value; she managed to make the work feel more motivating by spearheading a corporate mentoring program. Similarly, an employee dismayed by the corporate carbon footprint could advocate for reform.

This approach isn’t without some risk, of course. Everyone has a finite amount of workplace capital. But Reitz told me that when she meets with employees who have been frustrated in their attempts to push for change, they can almost always identify something more to try — something different, or something more effective — that will allow their message to be more persuasive.

And yet there will be times when the best option is to walk away. Quitting a job that’s a constant source of microstress might feel like a personal failure, like you’ve let it win. But you can use what you’ve learned to find a new employer that’s more in line with your values. I’ve worked with many people who have no plans to need parental leave but who intentionally seek out employers who offer generous policies because of what it symbolizes.

Whether someone stays or leaves, Dillon suggests seeking sources of meaning outside work. Friendships, hobbies, physical exercise — all these things keep us grounded and help us gain perspective. This isn’t really about work-life balance; it’s about making work just one aspect of identity. It’s a kind of portfolio diversification: the totality of one’s eggs, the importance of multiple baskets.

Perhaps I should mention that in Cross and Dillon’s research, only 10% of the high achievers they interviewed stood out as rising above their stressors. I asked her: Does that mean the rest of us are doomed? “They intuitively had methods of coping with it,” says Dillon. But “I think we’re all capable of it.”