But behind the scenes, her senior campaign aides have been in frequent contact with Sanders advisers while also trying to build bridges to a wing of the party skeptical of Mrs. Clinton and the brand of moderate politics her husband advanced.

Since she clinched the number of delegates needed to secure her party’s nomination on June 7, the campaign has reached out to Mr. Sanders’s supporters, dispatching three top staff members — the campaign manager, Robby Mook; director of states and political engagement, Marlon Marshall; and the top policy adviser, Jake Sullivan — to states that Mr. Sanders won, including New Hampshire, Wyoming, Vermont and Washington.

Mr. Sanders, of Vermont, was in a bittersweet but resolute mood on Tuesday, according to his advisers, as he took the stage with Mrs. Clinton. He was back in a state that once filled his campaign with hope after he crushed Mrs. Clinton by 22 percentage points in the February primary, and he came around grudgingly to supporting her, the advisers said. But he was also determined to make a strong case against Mr. Trump and, in doing so, champion Mrs. Clinton as the only chance to defeat him.

Taking the stage together in the high school gymnasium, Mrs. Clinton and Mr. Sanders stood before a giant American flag and Mrs. Clinton’s motto, “Stronger Together.” The clashes in the audience quickly subsided, and Mr. Sanders drew some of his strongest cheers as he described his unexpectedly competitive challenge against Mrs. Clinton and his primary and caucus victories in 22 states. In an odd passage for a concession speech, Mr. Sanders said that Mrs. Clinton had “389 more pledged delegates than we have, and a lot more superdelegates” — a reference to party leaders that drew boos from the audience and a steely look from Mrs. Clinton.

One person close to Mr. Sanders said that the senator and his wife, Jane, were “putting on a good face” on Tuesday, but that they were disappointed that his campaign had not been more successful after he gave it so much of his energy and rallied millions of people around his ideas.