PALM BEACH, Fla.—Riding a van back to Mar-a-Lago after a news conference this week, White House officials told economic adviser Lawrence Kudlow that he had just said something bound to produce some unwanted headlines.

Mr. Kudlow had suggested that Nikki Haley, the U.S. ambassador to the United Nations, suffered “momentary confusion” when she said on TV over the weekend that the U.S. was poised to slap Russia with new sanctions. Ms. Haley hadn’t been told those plans had changed—something Mr. Kudlow didn’t know until later.

Initially, Mr. Kudlow didn’t believe he had given offense, a White House official recalled. Later, when White House Chief of Staff John Kelly showed him Ms. Haley’s terse response—“With all due respect, I don’t get confused”—Mr. Kudlow quickly called her to apologize.

But the dust-up became a diversion during the U.S.-Japan summit that ended on Thursday.

Mr. Kudlow’s start underscores the challenges of working in a White House with little message discipline and a president who likes to improvise.

Three weeks into the job as National Economic Council director, he has embraced his role as a self-proclaimed “happy warrior” for President Donald Trump—delighting the president and surprising some White House staff with his unscripted style. He has irked Ms. Haley, and unnerved economists with his unsparing put-down of the nonpartisan Congressional Budget Office’s analysis that the recently passed tax cuts would increase deficits.

“Never believe the CBO,” he said during a television interview.

Douglas Holtz-Eakin, a Republican economist who led the CBO for two years beginning in 2003, said at an event in Washington on Wednesday that Mr. Kudlow mischaracterized how the agency does its analysis.

“He’s now not a CNBC commentator. He is the NEC director,” Mr. Holtz-Eakin said. “He should not be commenting on a legislative branch agency in this way. It’s 1,000% inappropriate and he needs to learn his job.”

Related

Mr. Kudlow stood by his criticism on Thursday. “It’s not personal,” he said in a brief phone call.

The viewer who counts most likes what he sees. Mr. Trump has told aides that he relishes having a telegenic new face out front touting the White House’s economic agenda. Mr. Kudlow’s camera-ready pedigree was one of the reasons Mr. Trump hired him, aides said.

“I have been on his show many, many times over the years, and we have had a lot of fun together,” Mr. Trump told reporters on Wednesday. “We haven’t always agreed, but I noticed lately Larry is agreeing more and more with me, which makes me quite happy.”

One place where the two have disagreed is tariffs: Mr. Trump sees them as a way to correct trade imbalances while Mr. Kudlow is more of a free-market evangelist. Yet Mr. Trump is entrusting Mr. Kudlow with a broad portfolio that includes handling a potential redo of the Trans-Pacific Partnership, an 11-nation trade treaty.

Mr. Kudlow is carving out a more public role than his predecessor Gary Cohn, a longtime Wall Street executive who resigned last month.

“He wants to go on TV and he’s used to doing it and I’m sure that was a factor in the president’s decision to hire him,” said budget director Mick Mulvaney.

Mr. Kudlow is also gaining influence behind the scenes.

The president tapped Mr. Kudlow to serve on the U.S. delegation that met with Japanese leaders at Mar-a-Lago for the two-day summit centering on trade and the North Korean nuclear threat.

At a private luncheon with Mr. Trump and Prime Minister Shinzo Abe on Wednesday, Mr. Kudlow interjected at several points. When the Japanese leader praised Mr. Trump’s tax overhaul and said it had invigorated the U.S. economy, Mr. Kudlow jumped in, suggesting Japan could try the same thing, according to Sarah Sanders, the White House press secretary.

Mr. Kudlow isn’t a newcomer to government. He served as a senior budget aide to Republican President Ronald Reagan more than 35 years ago.

“I participated in all of these processes, but not at this level,” Mr. Kudlow said in a recent interview. “The NEC is a larger job than I thought. … So I’m learning the ropes.”

The Obama administration was careful to avoid such mixed-message slip-ups. In 2009, then-NEC Director Lawrence Summers appeared on one Sunday morning talk show and declared the recession over, while another top economic adviser, Christina Romer, appeared on a separate program and said the recession hadn’t ended. After that, the Obama White House never again allowed both advisers to do concurrent briefings.

The Trump White House is more freewheeling. During his first week on the job, several senior staffers, including Mr. Kudlow, appeared to be out of the loop when Mr. Trump announced plans to consider an additional tariffs on $100 billion in imports from China, in addition to previously announced tariffs on $50 billion in Chinese imports.

Asked the following day when he learned of the tariffs plan, Mr. Kudlow paused and said, “Last evening,” which was when the White House made the announcement.

Mr. Kudlow’s arrival hasn’t led to major turnover on the staff of the NEC, a contrast with a string of resignations that followed John Bolton’s start at the National Security Council.

An open question is whether Mr. Kudlow can retain the staff built by Mr. Cohn, which is highly regarded even among Mr. Cohn’s detractors.

“Everyone unanimously agreed he built the best team,” said one official. “Kudlow is going to have to be careful,” because staffers could leave if they see him more as a spokesman than a policy master.

Mr. Kudlow, an informal adviser to Mr. Trump during the 2016 presidential campaign, wound up in the job after Mr. Cohn resigned following the president’s surprise announcement that he would impose tariffs on steel and aluminum imports.

On his 10th day at work, Mr. Kudlow joked about having already outlasted Anthony Scaramucci, the outspoken financier who served briefly as White House communications director last year. “I’ve completely beaten Scaramucci,” he said.

The comparison wasn’t lost on some White House officials.

Both men can be candid, a penchant that can go awry, as seen with the flap with Ms. Haley this week. Said one White House official: “There’s a little bit of Mooch in him.”