If Trump wins the White House and Ryan keeps his job, the two would presumably work together, but Ryan on Thursday sounded reluctant to endorse elements of Trump’s agenda that deviate from conservative orthodoxy. Ryan didn’t “want to get into hypotheticals” when asked if he would help Trump achieve his stated aim of renegotiating—or, absent that, withdrawing from—the North American Free Trade Agreement. He eventually conceded that “there are things we can do to upgrade and improve” the deal. When Ryan was asked if he would help Trump pass a $550 billion infrastructure bill, an amount the GOP nominee has indicated he wants to see spent, the crowd broke into laughter. “That’s not in the ‘Better Way’ agenda,” Ryan quipped.

The Better Way agenda is the speaker’s aspirationally titled policy plan for his party. He touted its specs on Thursday, highlighting the importance of a conservative agenda aimed at tackling poverty and pursuing tax and health-care reform. The plan is part of Ryan’s attempt to offer an alternative, softer-around-the-edges brand of conservatism that contrasts with Trump’s brash political style and nonconformist policy prescriptions. It’s not an easy task. The more the Republican nominee deviates from the standard GOP script, the louder the House speaker needs to be if he wants to act as a counterweight. But the more negative publicity Trump generates, the harder it is for Ryan to promote his own vision without being dragged off-topic by his party’s presidential nominee.

Ryan has attempted to strike a balance between supporting and avoiding Trump, a strategy that comes across as strange and confusing at times. He has endorsed Trump, but has repeatedly spoken out against him. Lately, Ryan seems to be trying to avoid criticism. He declined to weigh in on Trump’s insults aimed at former Miss Universe Alicia Machado after the debate, despite his willingness to previously denounce Trump’s comments on Judge Gonzalo Curiel, and express support for Khizr Khan, after both became Trump’s targets. It might help the House speaker build goodwill with pro-Trump party leaders if he refrains from reprimands, but it also indicates that Ryan, who’s styled himself as a principled conservative, bows to political pressure just like other politicians.

If Trump loses badly in November, Ryan’s agenda may gain more prominence and support party-wide as a way to rebuild. But the ideas that Trump has put forward, and the resonance they have had with the conservative base, won’t simply disappear.

When the topic of immigration reform came up during the conversation Thursday, Ryan echoed, to some extent, Trump’s calls to protect the border. “You’ve got to start with security,” he said. “The problem so many people have is there is no faith or confidence that we’ll actually secure our border.” But, Ryan added: “I think there is a way to deal with the undocumented population that doesn’t involve mass deportation, that doesn’t involve an amnesty, that gets a person a way to earn their right to a work permit.” Still, he conceded that “what I don’t think works is a big, comprehensive bill.”

For all his promises of compromise, it wouldn’t be easy for the House speaker to work with either Clinton or Trump. If Clinton wins, Ryan could face at least four more years of the opposing party in the White House. If Trump wins, Ryan may have to decide how much to stand in opposition to the man who’s upended his party, and how much he is willing to, as Trump might put it, make a deal.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.