For Musk, revamping the H-1B visa program is probably a deal breaker.

Just before and after the US presidential election, SpaceX's head of communications, Dex Torricke-Barton, took to all manner of social media to warn of a Donald Trump presidency. On Medium, he wrote of his support for Hillary Clinton, "Diversity and openness to the world aren’t threats to this country—they are what make America great. I’m with her. I’m with Earth." After Trump won, Torricke-Barton wrote in a now deleted tweet, "Earth has fallen." And on his personal Facebook page, Torricke-Barton said, "Donald Trump, we will tear down your wall. I promise." Less than a week later, and only about six months into his high-profile job at SpaceX, Torricke-Barton was gone from the company.

Torricke-Barton told me he left SpaceX on his own, and he has since written that he will devote his career to social causes. However, after the company received pressure from NASA and the US Air Force as a result of these public anti-Trump musings, SpaceX's director of communications was likely—at a minimum—encouraged to leave. After the election, SpaceX may not have been thrilled about who the new president of the United States was. But clearly SpaceX—and more importantly its founder, Elon Musk—was ready to work with the new president.

Since that time, Musk joined other tech industry leaders for meetings at Trump Tower with the president-elect. He also became a member of President Trump's Strategic and Policy Forum to help the administration fashion its economic agenda. Few begrudged Musk his willingness to help Trump and speak with his advisers about the importance of climate change and the need for further commercialization of spaceflight.

Taking to Twitter

But then Musk took to Twitter. On January 24, the tech titan expressed his support for Rex Tillerson as secretary of state: "This may sound surprising coming from me, but I agree with The Economist. Rex Tillerson has the potential to be an excellent Sec of State." Musk then proceeded to defend this view, even when prominent climate scientist Michael Mann urged him to reconsider. "I'm just saying that we should see what happens first. The actions may be surprising," Musk tweeted.

Here, Musk's motivations seem pretty straightforward. Concerned about climate change, he may have felt he could make a difference by working with the Trump administration instead of throwing stones from outside the inner circle. In Tillerson, too, Musk felt he had found a partner with whom he could work to affect climate change legislation (and perhaps benefit Tesla and its focus on electric cars and solar energy as well). The New York Times reported this "strategic relationship" between Musk and the Trump administration may be helping to advance the notion of a carbon tax.

But then the Trump administration implemented its ban on immigrants from Muslim countries last weekend. Surprisingly, Musk waded into these muddy political waters. Although he said this was not the "best way" to address challenges faced by the United States, he then encouraged his followers on Twitter to focus on the order itself rather than media accounts. "Reading the source material is better than reading other people's opinions about the source material," he tweeted. Again, Musk expressed the view that this matter was best addressed through cooperation with Trump rather than open hostility.

Backlash and a backout?

Now, Musk is starting to feel the backlash. BuzzFeed reported this week that some customers are canceling their Tesla orders due to Musk's cooperation with the Trump administration. He has also faced substantial criticism on Twitter.

So what happens next? After the blowback, perhaps Musk will realize that his public comments about the Trump administration last week, especially in regard to the Muslim ban, missed the mark. Like Trump, he sometimes tweets impulsively, without considering the political ramifications of his words. And now, Musk and the Trump administration may soon be coming to a breaking point.

The executive order being contemplated to revamp the H-1B visa program will be widely panned by the tech industry, including Musk and his companies, Tesla and SpaceX. The likely outcome of such an order would be to crash the value of tech stocks. For Musk, this would very likely be a deal breaker. He has yet to publicly decry the proposed executive order, but doing so would offer Musk a chance to reestablish his bonafides with the environmental and liberally minded te