Google’s headquarters in Mountain View, Calif., in October 2015. (Marcio Jose Sanchez/AP)

A TALE that appeared to have a happy ending has taken a grim turn: Workers at Google walked out this fall in protest of the company’s workplace culture and payoffs to male executives accused of sexual harassment. In response, leadership eliminated forced arbitration first for harassment complaints and then for all employee disputes. But on April 22, two of the organizers accused the firm of lashing out against them afterward.

Meredith Whittaker and Claire Stapleton, both longtime Google employees, lodged the claims of retaliation in a letter to co-workers on Monday. Ms. Whittaker, who leads an artificial intelligence research group at Google and runs an external AI ethics organization at New York University, said the company announced her internal role “would be changed dramatically” and told her to drop her outside work. Ms. Stapleton, a YouTube marketing manager, said Google demoted her and then instructed her to go on medical leave even though she was not sick. Google apparently reversed the demotion when she hired a lawyer.

Google, which has released a blog post detailing a new website for employees to report concerns, and is publicly sharing its harassment policies, denies the allegations of retaliation. Reassignment, the company says, is commonplace “to keep pace with evolving business needs.” But the damage is obvious: The success of the Google walkout was supposed to have been a sign to other workers in Silicon Valley, who generally are not unionized, that they could change their industry by standing up and banding together. Now, they have cause for greater caution.

This harmful message extends beyond issues of diversity and inclusion. The news that Ms. Whittaker’s role would be overhauled came right after Google disbanded its external ethics review board, and at her NYU institute and elsewhere, she has agitated for safeguards around nascent technologies such as facial recognition. Of course, objections to a company’s decision to, say, reenter the Chinese market amid censorship concerns may not enjoy the same legal protections as sexual-harassment complaints. But something similar is at stake: the ability of employees, in a business that prides itself on openness, to speak freely about the workplace and world they want to help their companies build.

Ms. Whittaker and Ms. Stapleton convened Google’s staff on Friday to share some of the 350 stories they collected of people who have reported immoral conduct and found themselves “punished, sidelined, and pushed out.” Google’s message in reply must be one that encourages accountability rather than one that stifles dissent — and its actions must match its words.