The two men — joined by their mutual friend, the lyricist and composer Amanda Green — met for the first time over Mexican food at a Chelsea restaurant. They were there to discuss the possibility of taking a huge step together — turning the 1997 documentary "Hands on a Hardbody" into a stage musical.
Wright, who wrote "I Am My Own Wife" and the musical "Grey Gardens," obviously knew about Phish, but confessed, "I immediately associated them with their Ben & Jerry's flavor." Would Anastasio be able to win him over to join their team?
"When I sat down, he gave one of the most thrilling, impromptu dissertations on why the overture to 'Gypsy' is one of the most seminal pieces of American theater music," Wright recalls. "I almost choked on my refried beans. I was like, 'This guy knows his stuff.' In that one moment, I was won over 100 percent."
Asked about it, Anastasio admits he may have hoped to impress his dinner companions: "I probably wanted them to know that I had a reverence for musical theater and that I've loved the theater my whole life."
Three years later, the trio's collaboration finally reaches Broadway after a stop at the La Jolla Playhouse in California last summer and lots of tinkering from a fairly obsessive trio.
"It's been a whirlwind," says Anastasio.
"It's been insane but really rather exhilarating," says Wright.
It was Wright who first rented S.R. Binder's documentary about an endurance contest at a Texas car dealership that offered a free Nissan pickup to whoever could keep their hands on it the longest. The winner lasted 77 hours.
Wright instantly thought it had potential for the stage: It had swelling drama, quirky characters and explored the meaning of the American dream. Wright gave it to his friend Green, the daughter of lyricist Adolph Green whose most recent Broadway show was "Bring It On."
She and Wright began to work on the musical but she still wanted to find the perfect collaborator to help her write the music. Her husband suggested the Phish frontman, whom Green had been writing songs with on the side.
"The answer was right in front of my face," she says. "Doug and I were both like, 'We want it to sound great. We don't want it to sound like Broadway-does-country or Broadway-does-rock. Trey just can't do a false move musically. It just sounds like we dreamed it would."
Anastasio threw himself into the work with the enthusiasm of a novice. Though he grew up in a home that revered show tunes and was regularly taken to Broadway, the jam band leader had to learn the hard way that what he did in Phish didn't translate to the musical stage.
"In the theater, everything has to propel the journey of the character — every lyric, every note, everything. In a concert venue, it's different," he says. "I expected it to be tough. I didn't expect it to be as tough as it has been."
Wright and Green credit Anastasio with the flexibility and bravery to know when a song isn't working, as he did just a week into previews at the Brooks Atkinson Theatre.
The collaborators cut the offending tune and then he and Green rushed into a dressing room and wrote a new song — "If She Don't Sleep" — for the first act in a "mad spasm of inspiration," as Wright puts it.
Anastasio, who was obsessed with "West Side Story" as a kid, joked that he used to love poring over old photos of Stephen Sondheim and Leonard Bernstein lounging on couches as they collaborated on last-minute songs.
Now he was doing it himself, minus all that cigarette smoke. "I always thought, 'That's it. That's the dream: Being locked in a room with a week left before opening night and to have to come up with a new song,'" he says.
His eclectic soundtrack built on work that Wright and Green had begun as they traveled to Texas to meet more than a half dozen of the original contest participants. So determined were the writers to ground their musical in real lives that they hired a private investigator to find as many as possible.
From those meetings came heartbreaking and moving portraits of desperate people needing the truck — a man who lost his job after falling off an oil rig, an Iraq war veteran, and a Texas-born Latino who needs the truck so he can sell it and pay for veterinary school.
"It's a musical I think about striving and about identifying dreams and going after them in a tangible and unapologetic way," Wright says. "We hope that it's funny and compassionate and surprising and that people see themselves in it no matter who they are and where they come from."
All these years after that first meeting over enchiladas, the collaborators — who have worked six days a week on the show and begin texting each other at 7 a.m. — say it's been worth it.
After a morning interview earlier this week, they were due back at the theater for more tinkering. There was a patch of underscoring that wasn't landing and they wanted to fix it.
"I'm looking forward to playing live music again," Anastasio says with mock fatigue, anticipating his band's summer tour that starts in Maine in July. "It's so much easier."