The answers Mr. Trump gets to his question have varied, depending on whom he asks.

Within the White House, most people he has talked to have assured the president that Mr. Pence has been a committed soldier, engaging in activities that Mr. Trump has eschewed, such as traveling to Hawaii to receive the remains of veterans of the Korean War, or visiting parts of the globe that Mr. Trump has avoided.

But some Trump advisers, primarily outside the White House, have suggested to him that while Mr. Pence remains loyal, he may have used up his utility. These advisers argue that Mr. Trump has forged his own relationship with evangelical voters, and that what he might benefit from more is a running mate who could help him with female voters, who disapprove of him in large numbers.

Others close to the president believe that asking about Mr. Pence’s loyalty is a proxy for asking about whether the vice president’s chief of staff, Nick Ayers, is trustworthy. Mr. Trump has been considering making Mr. Ayers the White House chief of staff to replace John F. Kelly, the retired Marine general — a decision several White House officials say has been with the encouragement of his adult children. But the president has put off making a decision for now.

The conversations were described in interviews with nearly a dozen White House aides and others close to Mr. Trump. But Hogan Gidley, the deputy press secretary, disputed that Mr. Trump had any misgivings, saying, “The president absolutely supports the vice president and thinks he’s doing an incredible job helping to carry out the mission and policies of this administration.”

Mr. Trump has never completely forgotten that during the 2016 campaign Mr. Pence issued a disapproving statement the day after the infamous “Access Hollywood” tape was made public, on which the president was heard making comments boasting about grabbing women’s genitals.