Justin Theroux originally had a larger role in Rian Johnson's Star Wars: The Last Jedi. In the film, the actor portrays a so-called "master codebreaker" who has a personal history with Maz Kanata. Finn and Rose embark on a mission to Canto Bight to recruit him so they can break into the First Order's lead star destroyer, but the two Resistance fighters are apprehended by authorities before they have a chance to interact with Theroux's character. Audiences got a glimpse of Theroux looking dapper in a fancy tuxedo with a red plom bloom on his lapel.

Despite being a high-profile name and the star of the TV show The Leftovers, Theroux's role in Star Wars amounted to little more than a glorified cameo. But initially, it was envisioned as a more substantial part.

While speaking with CinemaBlend to promote his new movie On the Basis of Sex, Theroux revealed how the character's function in the story evolved over time:

It was one of those things. Rian [Johnson] called me a couple of years before making it, and said, 'Hey, there's this character, blah, blah, blah.' And I think over the course of the making the character became reduced, as they sort of locked in on what the overall thing was. And then he sort of called me last minute, I'd sort of forgotten about it, and then he called me last minute and said, 'Hey, it's really essentially a cameo, and sort of a punchline. Would you like to come in and play this part?' And I thought, 'Sure, that'd be...' I mean, come on!

The master codebreaker was a nut Johnson evidently spent quite a bit of time trying to crack. At one point, he toyed with the idea of Billy Dee Williams' Lando Calrissian filling that role, but felt it wiser to make it an entirely new character. It's no secret that most movies go through multiple revisions before making it to the big screen, so it shouldn't be a surprise to anyone that the master codebreaker's role was diminished as Johnson fine-tuned the screenplay. While it might have been fun to see more of Theroux in action, there frankly wasn't much room for him to have a bigger part. The Last Jedi deals with so many moving pieces and storylines that it essentially would have been filler to give Theroux additional screen time.

Obviously, Theroux didn't let this turn of events dampen his spirits about joining the galaxy far, far away, so it'll be interesting to see if he joins any of the other Star Wars projects in development. Just because he played the master codebreaker in Last Jedi doesn't preclude him from taking on another character (especially since this is a franchise that makes use of performance-capture). Theroux's amassed a wide-ranging and interesting filmography over the course of his career, so Lucasfilm would probably be happy to have him back in the fold.