By Dan Snierson
June 25, 2017 at 10:30 PM EDT

[Warning: This story contains plot details from Sunday night’s season finale of Silicon Valley, titled “Server Error.”]

Well, you probably knew Erlich’s story wasn’t going to end with a Wired cover story anointing him the next Steve Jobs. (Although: Look at him in a black turtleneck.)

No, the final fate of Erlich Bachman (T.J. Miller), as revealed in the season 4 finale of Silicon Valley, was dark, harsh, exotic, and, you could argue, on-brand for the puffed-up Pied Piper investor and Hacker Hostel proprietor/mercenary. For four seasons of HBO’s beloved tech comedy, he served as a pompous pain in the ass to Richard (Thomas Middleditch) & co. and as a scene-stealing, off-kilter delight to fans, but now the parade of punchlines and pathos has drawn to a close, because, as you know by now, Miller is exiting the series.

Having decided in season 4’s penultimate episode that he’d finally read enough tea leaves (marijuana leaves?) and experienced enough failure in this town to peace out of the Valley, Erlich announced that he was going to take advantage of Gavin Belson’s invitation (which was to Richard, not to him, but, you know, semantics) to come to Tibet, where the former Hooli CEO had shaved his head and was meditating with monks. (In a moment that cuts deep-n-sad upon reflection now, he couldn’t even solicit a proper — or any — goodbye from the Pied Piper crew as he headed out the door, and Erlich’s foil Jian Yang!!! unceremoniously chucked his luggage out of the car when he dropped him off at the airport.)

Not shockingly, Erlich did not take to the monastery life, instead streaming episodes of House on his phone when he should have been strengthening his soul. And when Gavin saw a chance to win back the Hooli board by rescuing Jack Barker (Stephen Tobolowsky) from a hostage situation at a factory in Beijing, he decided to quickly bail out of Tibet. But when Gavin tried to motivate Erlich into motion, the red-robed buffoon with the funny facial hair was becoming one with an opium pipe whilst splayed out on a bed, only able to respond with “Big… Head,” accompanied by a stoner giggle, a nod back to the end of the show’s first episode. Gavin decided to leave him high, but not dry, handing a guy a fat stack of cash and asking how long that would tide over Erlich. The answer: five years. Harsh toke.

A little later, back in the States, after the newly reinstated Hooli CEO tried unsuccessfully to acquire Pied Piper, Richard asked, “Did Erlich ever show up in Tibet?” Gavin replied, “No.” And so the legend of Erlich evaporated into thin Tibetan air.

The plot was originally written as a cliffhanger, and one could see Erlich coming to his senses eventually and bumbling his way home while insulting culture after culture. But as Miller began thinking about leaving the show to focus on other parts of his career (stand-up, The Gorburger Show, a burgeoning movie career), he became enamored with the idea that leaving this story hanging, well, forever would serve as the right swan song for the guy who squarely didn’t fit into Pied Piper but roundly tried to insinuate himself at every turn and grab whatever glory he could.

“I hope that people get the joke — and also appreciate that this is the perfect end for Erlich,” Miller tells EW. “He’s an outsider. He never belonged there. Nobody wants him there. Nobody likes him. He doesn’t have any friends. Someone would pay to have Erlich go away. And I thought, ‘Why not make that permanent? Why not make that real? In a show that is so cyclical, why not have instead of a cliffhanger just a permanent ending? I mean, that’s why everybody loves Game of Thrones.’”

“What I think in some way is they wanted to do was say, ‘T.J., we’re leaving your character with a cliffhanger that is: Will he ever be in Pied Piper again?'” he continues. “And I think it’s really interesting that the answer was no, and he wanted to be off in the ether. Rather than sort of keep being a conman and justifying his existence, he’d rather just float off into opium.”

Miller, who admits that he would “go home sometimes and tear up thinking of how sad this guy is, how tragic,” opines that there is a version of Erlich’s saga in which one day he ends up running a large tech company, and he and Richard wind up like Steve Jobs and Steve Wozniak — or Gavin Belson and Peter Gregory. “That is one way for his story to end,” he says. “But another is just that he never quite made the case for his presence, and so he disappeared.”

Which is, of course, what happened here. Miller uses words like “apropos, “a necessary evil,” “tragic,” “self-aware,” “raw,” and “real” to describe Erlich’s fate. “There’s no reason for Erlich, except to laugh at him,” he says. “The only reason I was on the show was to laugh at me, and I loved that and loved the character. But it’s so interesting to say, ‘That’s it. Everybody hated him. And now he’s gone.’”

Erlich’s last words in the episode — “Big… Head” — were improvised by Miller in a callback to the end of the pilot, when “he’s celebrating something with these guys that he had no part of,” says Miller. “He didn’t do anything to help, but he wants to be a part of the celebration. That’s when he’s happiest, when he’s really high, surrounded by people that are celebrating; he feels like he’s a part of something. He said ‘Big Head’ because he was equally astounded that Big Head [Josh Brener] could be involved in any of this either — they both have no justification for being there, except Josh Brener is funny and I’m not.”

Here, he decided to return to those words because, well, “he was always astounded by the fact that Big Head was there with them, being promoted, being the Chauncey Gardner of Being There, so when he was high, that was funny to him. I think that in some ways, that’s his sign-off. Like, ‘I can’t believe I even made it this far, I can’t believe I was ever here, I can’t believe Jian Yang [Jimmy O. Yang] flew me to China.’ All of it’s really funny to him. And that idea that he’s a nihilist… I was like, I’m going to have him [say], ‘Big Head,’ because the show is cyclical, and he remains unimportant and irrelevant.”

So, how long does Miller think that Erlich truly will remain in Tibet in a poppy stupor? “I think right at five years, that guy is just going to pull the opium and he’s going to have the worst withdrawal you could ever happen, and then try to figure out how the f— to get back to Silicon Valley,” he quips. But there’s another enticing scenario he drops, albeit briefly: “Maybe in five years he just shows up and he’s deep into it with the Chinese government,” says Miller. “He’s been operating a Darknet situation for the last three years; he was high on opium for two years before that. But no, not really. [This ending] is funny because that’s it. It’s funny because for the first time in the history of the show, it stops being cyclical.” Which is why — sorry, Erlich fans — he “never” plans on returning to the show. As he sums up: “If I ever come back, it ruins the joke.” (And, as he notes, the show can benefit from a change of character, and he never wanted the audience to get sick of Erlich. “I just think the show is so good and continues to grow and thrive and get better,” he says. “This can only make it better.”)

Miller hopes that as fans take in this last hit of Erlich Bachman, they remember not only all of the geriatric insultsVC negging, and child-slapping but they also remember him “in a funny way, as a tragic figure,” he shares. “It’s just interesting to feel bad for him. He just didn’t make it along with those guys, he couldn’t justify his existence. Because a lot of people feel like that. So it’s relatable, also, just the idea that ‘I too feel like I’m just bulls—ting my way through this and I’m hoping to be accepted and liked and important and leave a legacy.’ That’s the other really big bummer — the only thing that Erlich cares about is being remembered — being known for his weird footwear, his corduroy blazers just like Steve Jobs was known for black turtlenecks —but instead of drifting out of people’s memories. It’s really sad.”

But maybe not the saddest. “The saddest thing of all is that his exit is ushered and shepherded by Jian Yang,” says Miller. “His only friend who hates him just throws his s— at him and is like, ‘I paid for you to go away forever.’ So ultimately, if people are angry,” adds a deadpan Miller, “be angry at Jian Yang.”

Head here to read our interview with Mike Judge about Miller’s exit and the season 4 finale.