EXCLUSIVE: All is well when it ends well. I’ve learned that after lengthy negotiations, The Office stars Ed Helms, John Krasinski and Jenna Fischer have reached an agreement in principal to return to the veteran NBC series next season and are inches away from signing on the dotted line. I hear the fourth original Office cast member whose deal is up, B.J. Novak, has not started discussions, but he has a dual role on the series as an actor and writer/executive producer.

Related: ‘The Office’ Update: Series Reboot Eyed As Talks With Cast Still In Holding Pattern

Keeping Helms, Krasinski and Fischer has been crucial for The Office, which lost its star Steve Carell last season and is facing the pending departures of Rainn Wilson, who is preparing to segue to his Office spinoff midway through next season, and Mindy Kaling, who got her pilot picked up to series at Fox. Getting Helms and Krasinski to return was not easy because of their busy feature schedules, and The Office is expected to accommodate that. Helms for once has the Hangover threequel to do. With the trio in place, the renewal of the veteran series, which remains NBC’s highest-rated comedy, is considered a formality. Remaining open is the question who will run The Office next season. I hear NBC is not close to naming a replacement for Paul Lieberstein, who will be leaving to focus on the spinoff, which he co-created with Wilson.