On a cool August night on the crowded patio of his private club in New Jersey, former President Donald Trump held up his phone to his dinner companions.

The Republican front-runner was having dinner with a Fox News contributor and columnist, Charlie Hurt, when a call came in from another member of the Fox team. The man on the other end of the line, Trump was delighted to show his guests, was Bret Baier, one of the two moderators of the first Republican debate Wednesday, according to two people with knowledge of the call.

It was Trump's second Fox dinner that week. The night before, he had hosted the Fox News president, Jay Wallace, and the network's CEO, Suzanne Scott, who had gone to Bedminster, New Jersey, hoping to persuade Trump to attend the debate. Baier was calling to get a feel for the former president's latest thinking.

For months, Fox had been working Trump privately and publicly. He was keeping them guessing, in his patented petulant way. But even as he behaved as if he was listening to entreaties, Trump was proceeding with a plan for his own counterprogramming to the debate.

The former president has told aides that he has made up his mind not to participate in the debate and has decided to post an online interview with Tucker Carlson that night instead, according to people briefed on the matter.

Upstaging Fox's biggest event of the year would be provocation enough. But an interview with Carlson — who was Fox's top-rated host and is at war with the network, which is still paying out his contract — amounts to a slap in the network's face by Trump. The decision is a potential source of aggravation for the Republican National Committee chair, Ronna McDaniel, who privately urged him to attend, including during her own visit to Bedminster last month.

But Trump's primary motive in skipping the debate is not personal animosity toward McDaniel but a crass political calculation: He doesn't want to risk his giant lead in a Republican race that some close to him believe he must win to stay out of prison.

But that's not the only reason.

'They purposely show the absolutely worst pictures of me'

Trump's relationship with Fox — a long-running saga that has been both lucrative and, more recently, extremely costly for the network — is the other issue that looms large in his thinking about the debate, according to people familiar with the president's conversations. They spoke on the condition of anonymity because they were not authorized to speak for the campaign.

His professed hatred of Fox — and the animus he often privately expresses about the chair of Fox Corp., Rupert Murdoch — is mixed with his recognition of Murdoch's power and a grudging acknowledgment that the network can still affect his image with Republican voters.

"Why doesn't Fox and Friends show all of the Polls where I am beating Biden, by a lot," Trump posted on his website, Truth Social, on Thursday morning, venting about the network's morning show. He added, "Also, they purposely show the absolutely worst pictures of me, especially the big 'orange' one with my chin pulled way back. They think they are getting away with something, they're not."

The Fox team working on the debate has prepared two sets of plans for Wednesday night: one for if Trump shows up and another for if he doesn't. Baier has spoken to Trump at least four times over the phone to make his case. Trump has explained his reluctance but always left the door open to a late change of plans, according to the people familiar with the calls.

Fox executives expect the audience for Wednesday's debate to be lower than the record 25 million who watched the first Republican debate in August 2015, even if Trump shows up, although his presence would almost certainly boost interest.

"President Trump is ratings gold, and everyone recognizes that," said Steven Cheung, the Trump campaign's communications director.

Trump has tried to use his leverage to get friendlier coverage. During his dinner with the two Fox executives, Wallace and Scott, Trump needled them about the network's coverage of him. He told them he was skeptical that Murdoch — whom Trump has known for decades — was not dictating the daytime political coverage that the former president found egregious.

Trump, who has often complained about what he contends is Fox's glowing coverage of Florida Gov. Ron DeSantis, dismissed a recent interview Baier conducted with DeSantis as "soft." Trump also told the Fox executives he couldn't believe they had fired Carlson.

Baier, who helped moderate Trump's first-ever political debate in August 2015 and has golfed with him, has a complicated relationship with the former president.

Baier, who will co-host Wednesday's debate with Martha MacCallum, interviewed Trump in June, an encounter Trump first called "fair" but then complained was "unfriendly." That change of heart came after news coverage pointed out the harm Trump may have caused himself legally with his answers about matters related to one of the federal cases against him.

A Fox News spokesperson, Irena Briganti, said the network "looks forward to hosting the first debate of the Republican presidential primary season, offering viewers an unmatched opportunity to learn more about the candidates' positions on a variety of issues, which is essential to the electoral process."

'Maybe I should just go'

Trump's top advisers oppose his participation in the debate to avoid giving his rivals a chance to elevate themselves at his expense and close the wide gap between them in the polls.

But until earlier this past week, Trump was still privately toying with the idea of attending. In one conversation, Trump had said, "Maybe I should just go," according to a person with knowledge of the call.

The former president has been quizzing confidants lately about whether he should debate. He has fixated on former Gov. Chris Christie of New Jersey, who is expected to be his harshest critic on the stage. And he has expressed a particularly intense disdain for the low-polling former governor of Arkansas, Asa Hutchinson, suggesting privately that it would be almost insulting to share a stage with him, according to a person who spoke to Trump.

Senior members of Trump's team — Chris LaCivita, Jason Miller and Cheung — all plan to attend the debate. The Trump campaign has arranged for prominent surrogates, including members of Congress, to visit the "spin room" after the debate to make Trump's case.

But as of Friday, Trump appeared to have lost interest in attending the debate, according to people with knowledge of his thinking. And he is now planning to attempt to upstage the event by participating in the interview with Carlson, though the exact timing and online platform remain unclear.

Trump's presence, despite his absence

Baier and MacCallum plan to make Trump a major figure in the two-hour program — whether he shows up or not.

The Fox team has prepared questions to ask Trump rivals about his most recent criminal indictment, which was handed down by a grand jury in Georgia. They are also considering integrating video of Trump into their questioning, according to people familiar with the planning.

The questions will begin immediately. Candidates will not be allowed to make opening statements. They will, however, be allotted 45-second closing statements. Each answer will be limited to one minute, with a sound like a hotel front desk's bell alerting candidates that their time has expired. (Fox has retired the doorbell-like chime it used in the last debates after it sent some dogs into barking fits.)

Unlike when Trump skipped a Fox debate in Iowa in January 2016, just before the caucuses there, Fox has had more time to prepare for Trump's absence.

This year, the RNC updated its rules to require candidates to sign a pledge no later than 48 hours before the debate, including commitments to support the party's nominee regardless of who it is and to not participate in any future debates not sanctioned by the RNC.

Trump has not signed the pledge. RNC officials have told people that no candidate, including Trump, will be allowed onstage without signing it. But Trump is far from principled on the matter. He has already signed a similar pledge vowing to "generally believe in" and "intend to support the nominees and platform" of the GOP in 2024 in order to qualify for the South Carolina primary ballot, according to a party official in the state.

In 2016, Fox did not know until the last minute possible that he was not going to show up. And even once the debate started, the hosts and producers were bracing for the possibility that he might arrive in the middle of the broadcast and demand to be allowed on the stage.